Source

pypi / templates / display.pt

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
      xmlns:metal="http://xml.zope.org/namespaces/metal"
      metal:use-macro="standard_template/macros/page">

<metal:fill fill-slot="head">
 <meta tal:condition="data/release/keywords | nothing"
       name="keywords"
       tal:attributes="content data/release/keywords" />
 <meta tal:condition="data/release/summary | nothing"
       name="description"
       tal:attributes="content data/release/summary" />
 <link rel="meta" title="DOAP" type="application/rdf+xml"
       tal:attributes="href string:${app/url_path}?:action=doap&amp;name=${data/name}&amp;version=${data/version}" />
 <style type="text/css">
  table.form th {white-space: pre;}
 </style>
</metal:fill>

<metal:fill fill-slot="body">
<div id="download-button" tal:condition="data/files">
 <tal:element condition="python:len(data['files']) == 1">
  <a tal:define="file python:data['files'][0]"
     tal:attributes="href python:app.store.gen_file_url(
        file['python_version'], data['name'], file['filename'])"
     class="button green" style="float:right;">Download<br />
    <span style="font-size: 75%" tal:content="file/filename">download</span>
  </a>
 </tal:element>
 <a tal:condition="python:len(data['files']) > 1" class="button green"
    style="float:right;" href="#downloads">Downloads &darr;</a>
</div>

<p style="font-style: italic" tal:content="data/release/summary | nothing" />

<p tal:condition="data/docs | nothing">
   <a tal:attributes="href data/docs">Package Documentation</a>
</p>

<p tal:condition="not:data/usinglatest">
<strong>Latest Version: </strong><a tal:attributes="href data/latestversionurl" title="Latest Version URL">
<span tal:content="data/latestversion" />
</a>
</p>


<p tal:replace="structure app/release_nav" />

<tal:element replace="structure data/release/description_html" />

<a name="downloads">&nbsp;</a>
<table tal:condition="data/files" class="list" style="margin-bottom: 10px;">
<tr>
  <th>File</th>
  <th>Type</th>
  <th>Py Version</th>
  <th>Uploaded on</th>
  <th style="text-align: right;">Size</th>
</tr>

<tr tal:repeat="file data/files" tal:attributes="class repeat/file/parity">
<tal:block tal:define="
      name       file/filename;
      url        python:app.store.gen_file_url(file['python_version'], data['name'], file['filename']);
      comments   file/comment_text;
      pkg_type   python:app.dist_file_types_d[file['packagetype']];
      py_version file/python_version;
      uploaded   python:file['upload_time'] and file['upload_time'].strftime('%Y-%m-%d');
      size       python:app.pretty_size(file['size']);
      downloads  file/downloads;
      md5_url    string:${app/url_path}?:action=show_md5&amp;digest=${file/md5_digest};
      pgp_url    python:file['has_sig'] and app.store.gen_file_url(
                   file['python_version'], data['name'], file['filename'])+'.asc';
      ">
    <td>
    <span style="white-space: nowrap;">
      <a tal:attributes="href string:$url#md5=${file/md5_digest}"
         tal:content="name" />
      (<a tal:attributes="href md5_url" title="MD5 Digest">md5</a><tal:block tal:condition="pgp_url">,
       <a tal:attributes="href pgp_url" title="PGP Signature">pgp</a></tal:block>)
    </span>
    <tal:block tal:condition="comments">
      <br />
      <span tal:replace="comments" />
    </tal:block>
        </td>
  <td style="white-space: nowrap;">
    <span tal:replace="pkg_type" />
  </td>
  <td>
    <span tal:replace="py_version" tal:condition="python:py_version != 'source'" />
  </td>
  <td tal:content="uploaded" />
  <td tal:content="size" style="text-align: right;" />
</tal:block>
</tr>

<tr><td id="last" colspan="6"></td></tr>
  </table>

<ul class="nodot" tal:condition="data/download_counts | nothing">
  <li><strong>Downloads (All Versions):</strong></li>
  <li>
    <span tal:content="data/download_counts/day" /> downloads in the last day
  </li>
  <li>
    <span tal:content="data/download_counts/week" /> downloads in the last week
  </li>
  <li>
    <span tal:content="data/download_counts/month" /> downloads in the last month
  </li>
</ul>

<ul class="nodot">
 <li tal:condition="data/release/author | nothing">
  <strong>Author:</strong>
  <span tal:content="data/release/author" />
 </li>

 <li tal:condition="data/release/maintainer | nothing">
  <strong>Maintainer:</strong>
  <span tal:content="data/release/maintainer" />
 </li>

 <li tal:condition="data/docs | nothing">
  <strong>Documentation:</strong>
  <a tal:attributes="href data/docs" tal:content="string:${data/name} package documentation" />
 </li>

<!-- The <th> elements below are a terrible terrible hack for setuptools -->
 <li tal:condition="data/release/home_page | nothing">
  <strong>Home Page:</strong>
  <!-- <th>Home Page -->
  <a tal:attributes="href data/release/home_page"
         tal:content="data/release/home_page" />
 </li>


 <li tal:condition="data/bugtrack_url | nothing">
  <strong>Bug Tracker:</strong>
  <a tal:attributes="href python:data['bugtrack_url']"
	  tal:content="structure
	  python:data['bugtrack_url'].replace('\n', ', ')"/>
 </li>

 <li tal:condition="data/release/download_url | nothing">
  <strong>Download URL:</strong>
  <!-- <th>Download URL -->
  <a tal:attributes="href data/release/download_url"
         tal:content="data/release/download_url" />
 </li>


 <li tal:condition="data/release/keywords | nothing">
  <strong>Keywords:</strong>
  <span tal:content="data/release/keywords" />
 </li>

 <li tal:condition="data/release/license | nothing">
  <strong>License:</strong>
  <tal:block define="hasnl python:'\n' in data['release']['license']">
  <pre tal:condition="hasnl" tal:content="data/release/license" />
  <span tal:condition="not:hasnl" tal:content="data/release/license" />
  </tal:block>
 </li>

 <li tal:condition="data/release/platform | nothing">
  <strong>Platform:</strong>
  <span tal:content="python:data['release']['platform'].replace('\n', ', ')" />
 </li>

<!-- TODO: add link to products in follow dependencies... -->
 <li tal:condition="data/requires | nothing">
  <strong>Requires</strong>
  <tal:element replace="python:', '.join(data['requires'])" />
 </li>
 <li tal:condition="data/provides | nothing">
  <strong>Provides</strong>
  <tal:element replace="python:', '.join(data['provides'])" />
 </li>
 <li tal:condition="data/obsoletes | nothing">
  <strong>Obsoletes</strong>
  <tal:element replace="python:', '.join(data['obsoletes'])" />
 </li>

 <li tal:condition="data/categories | nothing">
  <strong>Categories</strong>
  <ul class="nodot">
   <li tal:repeat="category data/categories">
    <a tal:attributes="href category/url"
       tal:content="structure category/pathstr"/>
   </li>
  </ul>
 </li>



 <li tal:condition="data/requires_dist | nothing">
   <strong>Requires Distributions</strong>
   <ul class="nodot">
     <li tal:repeat="require data/requires_dist">
       <a tal:condition="require/href" tal:attributes="href require/href"
           tal:content="require/name"/>
        <tal:block tal:condition="not:require/href"
                   tal:replace="require/name">
        </tal:block>
     </li>
   </ul>
 </li>

 <li tal:condition="data/provides_dist | nothing">
   <strong>Provides Distributions</strong>
   <ul class="nodot">
     <li tal:repeat="provide data/provides_dist">
       <a tal:condition="provide/href" tal:attributes="href provide/href"
           tal:content="provide/name"/>
       <tal:block tal:condition="not:provide/href"
                   tal:replace="provide/name">
        </tal:block>

     </li>
   </ul>
 </li>

 <li tal:condition="data/obsoletes_dist | nothing">
   <strong>Obsoletes Distributions</strong>
   <ul class="nodot">
     <li tal:repeat="obsolete data/obsoletes_dist">
       <a tal:condition="obsolete/href" tal:attributes="href obsolete/href"
           tal:content="obsolete/name"/>
        <tal:block tal:condition="not:obsolete/href"
                   tal:replace="obsolete/name">
        </tal:block>

     </li>
   </ul>
 </li>

 <li tal:condition="data/requires_external | nothing">
   <strong>Requires Externals</strong>
   <ul class="nodot">
     <li tal:repeat="require data/requires_external">
        <tal:block tal:replace="require">
        </tal:block>
     </li>
   </ul>
 </li>

 <li tal:condition="data/requires_python | nothing">
    <strong>Requires Python</strong>: <tal:block tal:replace="data/requires_python"></tal:block>
 </li>


 <li tal:condition="data/roles/Owner | nothing">
  <strong>Package Index Owner:</strong>
  <span tal:content="python:', '.join(data['roles']['Owner'])" />
 </li>

 <li tal:condition="data/roles/Maintainer | nothing">
  <strong>Package Index Maintainer:</strong>
  <span tal:content="python:', '.join(data['roles']['Maintainer'])" />
 </li>

 <li>
  <strong><a href="http://usefulinc.com/doap">DOAP</a> record:</strong>
  <a tal:content="string:${data/name}-${data/version}.xml"
  tal:attributes="href string:${app/url_path}?:action=doap&amp;name=${data/name}&amp;version=${data/version}" />
 </li>

</ul>

<table tal:condition="python:app.loggedin and (app.store.has_role('Admin') or
  app.store.has_role('Maintainer', data['name']) or app.store.has_role('Owner', data['name']))" class="history">
 <tr><th colspan="4" class="header">Journal</th></tr>
 <tr><th>Action</th><th>Date</th><th>User</th><th>Address</th></tr>
 <tr tal:repeat="
         entry python:app.store.get_journal(data['name'], data['version'])"
     tal:attributes="class repeat/entry/parity">
  <td nowrap="" tal:content="entry/action" />
  <td nowrap="" tal:content="python:str(entry['submitted_date'])[:-3]" />
  <td nowrap="" tal:content="entry/submitted_by" />
  <td nowrap="" tal:content="entry/submitted_from" />
 </tr>
</table>

</metal:fill>
</html>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.