[Pypi-checkins] r803 - in trunk/pypi: . templates tools

richard python-checkins at python.org
Sat Jul 24 16:37:09 CEST 2010


Author: richard
Date: Sat Jul 24 16:37:09 2010
New Revision: 803

Modified:
   trunk/pypi/templates/display.pt
   trunk/pypi/templates/standard_template.pt
   trunk/pypi/tools/demodata.py
   trunk/pypi/webui.py
Log:
some py3k fun :-)

Modified: trunk/pypi/templates/display.pt
==============================================================================
--- trunk/pypi/templates/display.pt	(original)
+++ trunk/pypi/templates/display.pt	Sat Jul 24 16:37:09 2010
@@ -19,7 +19,6 @@
 </metal:fill>
 
 <metal:fill fill-slot="body">
-
 <p style="font-style: italic" tal:content="data/release/summary | nothing" />
 
 <p tal:condition="not:data/usinglatest">

Modified: trunk/pypi/templates/standard_template.pt
==============================================================================
--- trunk/pypi/templates/standard_template.pt	(original)
+++ trunk/pypi/templates/standard_template.pt	Sat Jul 24 16:37:09 2010
@@ -28,7 +28,14 @@
     <body>
       <!--  Logo  -->
       <h1 id="logoheader">
-        <a accesskey="1" href="http://www.python.org" id="logolink"><img tal:attributes="src string:${app/config/pydotorg}images/python-logo.gif" alt="homepage" border="0" id="logo" /></a>
+       <a accesskey="1" href="http://www.python.org" id="logolink">
+        <tal:x condition="python:data.get('is_py3k')">
+          <img src="http://pypi.python.org/python-3.png" />
+        </tal:x>
+        <tal:x condition="python:not data.get('is_py3k')">
+          <img tal:attributes="src string:${app/config/pydotorg}images/python-logo.gif" alt="homepage" border="0" id="logo" />
+        </tal:x>
+       </a>
       </h1>
       <!--  Skip to Navigation  -->
       <div class="skiptonav"><a accesskey="2" href="#left-hand-navigation"><img tal:attributes="src string:${app/config/pydotorg}images/trans.gif" alt="skip to navigation" border="0" id="skiptonav" /></a></div>
@@ -63,7 +70,7 @@
                 <tal:for-nav repeat="link app/navlinks_html">
                   <span tal:replace="structure link"/>
                 </tal:for-nav>
-		<li><a href="/pypi?:action=browse&amp;c=533&amp;show=all">Python 3 packages</a></li>
+		<li><a href="/pypi?:action=browse&amp;c=533&amp;c=534&amp;c=535&amp;c=538&amp;show=all">Python 3 packages</a></li>
 
                 <li><a href="http://wiki.python.org/moin/CheeseShopTutorial">Tutorial</a></li>
 
@@ -177,8 +184,7 @@
 
 
             <div class="section">
-
-              <h1 tal:content="data/title"></h1>
+              <h1><tal:x replace="data/title" /></h1>
 
               <metal:slot define-slot="body">
 

Modified: trunk/pypi/tools/demodata.py
==============================================================================
--- trunk/pypi/tools/demodata.py	(original)
+++ trunk/pypi/tools/demodata.py	Sat Jul 24 16:37:09 2010
@@ -51,7 +51,7 @@
             '_pypi_hidden':version!='0.4'
             })
 
-st.add_file('spam', '1.0', 'THIS IS SOME CONTENT', '1234', 'text/plain',
+st.add_file('spam', '1.0', 'THIS IS SOME CONTENT', '1234', 'sdist',
             'any', '', 'demo.txt', None)
 
 st.commit()

Modified: trunk/pypi/webui.py
==============================================================================
--- trunk/pypi/webui.py	(original)
+++ trunk/pypi/webui.py	Sat Jul 24 16:37:09 2010
@@ -1273,13 +1273,17 @@
             return [ cgi.escape(x['specifier']) for x in l]
 
         categories = []
+        is_py3k = False
         for c in self.store.get_release_classifiers(name, version):
             path = str2path(c['classifier'])
+            pathstr = path2str(path)
+            if pathstr.startswith('Programming Language :: Python :: 3'):
+                is_py3k = True
             url = "%s?:action=browse&c=%s" % (self.url_path, c['trove_id'])
             categories.append(dict(
                 name = c['classifier'],
                 path = path,
-                pathstr = path2str(path),
+                pathstr = pathstr,
                 url = url,
                 id = c['trove_id']))
 
@@ -1367,6 +1371,7 @@
                             tally_ratings=tally,
                             comments=comments,
                             categories=categories,
+                            is_py3k=is_py3k,
                             roles=roles,
                             newline_to_br=newline_to_br,
                             usinglatest=using_latest,


More information about the Pypi-checkins mailing list