Last active
December 17, 2015 12:39
-
-
Save dstufft/5611660 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Traceback (most recent call last): | |
File "webui.py", line 286, in run | |
self.inner_run() | |
File "webui.py", line 601, in inner_run | |
getattr(self, action)() | |
File "webui.py", line 2277, in urls | |
title="Urls for %s %s" % (name, version)) | |
File "webui.py", line 389, in write_template | |
content = template(**context) | |
File "/Users/dstufft/.virtualenvs/pypi/lib/python2.7/site-packages/zope/pagetemplate/pagetemplate.py", line 111, in __call__ | |
return self.pt_render(self.pt_getContext(args, kwargs)) | |
File "/Users/dstufft/.virtualenvs/pypi/lib/python2.7/site-packages/zope/pagetemplate/pagetemplate.py", line 129, in pt_render | |
raise PTRuntimeError(str(self._v_errors)) | |
PTRuntimeError: ['Compilation failed', 'xml.parsers.expat.ExpatError: not well-formed (invalid token): line 90, column 10'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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="body"> | |
<p tal:replace="structure app/release_nav" /> | |
<p><b>Hosting Mode</b></p> | |
<p>Download tools like pip ask PyPI what download URLs exist for a package. | |
When determining those URLs, PyPI will include URLs pointing to files | |
you have uploaded to PyPI. While this is the preferred mechanism, we | |
also allow packages to refer to files on hosts external to PyPI. The URLs | |
referred to below are used <em>in addition to</em> any URLs pointing to | |
PyPI-hosted files.</p> | |
<form tal:attributes="action app/url_path" method="POST" enctype="multipart/form-data"> | |
<input type="hidden" name=":action" value="urls" /> | |
<input type="hidden" name="name" tal:attributes="value data/name" /> | |
<input type="hidden" name="version" tal:attributes="value data/version" /> | |
<input tal:condition="python: data['hosting_mode'] != 'pypi-explicit'" | |
type="radio" name="hosting_mode" id="pypi-explicit" value="pypi-explicit" /> | |
<input tal:condition="python: data['hosting_mode'] == 'pypi-explicit'" | |
type="radio" name="hosting_mode" id="pypi-explicit" value="pypi-explicit" checked="checked" /> | |
<label for="pypi-explicit">Do not extract URLs from the long description field - | |
only use URLs explicitly specified below and files uploaded to PyPI (this is preferred).</label> | |
<br/> | |
<input tal:condition="python: data['hosting_mode'] != 'pypi-scrape'" | |
type="radio" name="hosting_mode" id="pypi-scrape" value="pypi-scrape" /> | |
<input tal:condition="python: data['hosting_mode'] == 'pypi-scrape'" | |
type="radio" name="hosting_mode" id="pypi-scrape" value="pypi-scrape" checked="checked" /> | |
<label for="pypi-scrape">Present URLs extracted from the long description field.</label> | |
<br/> | |
<input tal:condition="python: data['hosting_mode'] != 'pypi-scrape-crawl'" | |
type="radio" name="hosting_mode" id="pypi-scrape-crawl" value="pypi-scrape-crawl" /> | |
<input tal:condition="python: data['hosting_mode'] == 'pypi-scrape-crawl'" | |
type="radio" name="hosting_mode" id="pypi-scrape-crawl" value="pypi-scrape-crawl" checked="checked" /> | |
<label for="pypi-scrape-crawl">As above but also ask tools to scrape | |
Homepage and Download URL (slow!)</label> | |
<br/> | |
<input type="submit" name="submit_hosting_mode" value="Change" /> | |
</form> | |
<p><b>Additional File URLs</b></p> | |
<form tal:attributes="action app/url_path" method="POST" enctype="multipart/form-data"> | |
<input type="hidden" name="name" tal:attributes="value data/name" /> | |
<input type="hidden" name="version" tal:attributes="value data/version" /> | |
<input type="hidden" name=":action" value="urls" /> | |
<table class="list" style="width: auto"> | |
<tr> | |
<th>Remove?</th> | |
<th>Release</th> | |
<th>URL</th> | |
</tr> | |
<tr tal:repeat="url python:app.store.list_description_urls(data['name'])" | |
tal:attributes="class repeat/url/parity"> | |
<td><input type="checkbox" name="url-ids" tal:attributes="value url/id" /></td> | |
<td tal:content="url/version" /> | |
<td><a tal:attributes="href url/url" tal:content="url/url" /></td> | |
</tr> | |
<tr> | |
<td colspan="2" id="last"> | |
<input type="submit" name="submit_remove" value="Remove" /> | |
</td> | |
</tr> | |
</table> | |
</form> | |
<p><b>Add a New URL</b></p> | |
<p>Each URL must locate a distribution file directly, not point to an | |
index page of file URLs. The contents of the URLs you provide here are not | |
scraped for file download URLs.</p> | |
<p>The URL fragment (after a "#" character) must include the MD5 hash of the file contents. | |
This should take the form "#md5=2f3dff3357af889fc7021b568d40e866". | |
Note: <em>PyPI does not verify the MD5 hash</em> but <em>install tools like pip do</em>.</p> | |
<form tal:attributes="action app/url_path" method="POST" enctype="multipart/form-data"> | |
<input type="hidden" name="name" tal:attributes="value data/name" /> | |
<input type="hidden" name="version" tal:attributes="value data/version" /> | |
<input type="hidden" name=":action" value="urls" /> | |
<input name="new-url" /> | |
<input type="submit" name="submit_new_url" value="Add URL" /> | |
</form> | |
<script type="text/javascript"> | |
if (1 < 2) alert("it works!"); | |
</script> | |
</metal:fill> | |
</html> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment