diff options
author | Richard Jones <richard@mechanicalcat.net> | 2013-02-09 11:02:37 +1100 |
---|---|---|
committer | Richard Jones <richard@mechanicalcat.net> | 2013-02-09 11:02:37 +1100 |
commit | ce80d317bc020ae9c61d278904ee7ac3d8f980bc (patch) | |
tree | d504c42c7cb26cc95202b85e5633279d9f775440 | |
parent | 343e515f1d0dafc4f88640a5ee219fadad437614 (diff) | |
download | decorator-ce80d317bc020ae9c61d278904ee7ac3d8f980bc.tar.gz |
packages.python.org -> pythonhosted.org
-rw-r--r-- | config.ini.template | 3 | ||||
-rw-r--r-- | config.py | 2 | ||||
-rw-r--r-- | store.py | 4 | ||||
-rw-r--r-- | templates/pkg_edit.pt | 6 |
4 files changed, 9 insertions, 6 deletions
diff --git a/config.ini.template b/config.ini.template index 5250fdf..6276971 100644 --- a/config.ini.template +++ b/config.ini.template @@ -6,6 +6,7 @@ user = pypi # port = 5432 files_dir = /MacDev/svn.python.org/pypi-pep345/files docs_dir = /MacDev/svn.python.org/pypi-pep345/docs +package_docs_url = http://pythonhosted.org/ [webui] mailhost = mail.python.org @@ -35,7 +36,7 @@ local-stats = local-stats global-stats = global-stats [sentry] -dsn = +dsn = [uwsgi] wsgi-file = pypi.wsgi @@ -31,6 +31,8 @@ class Config: self.pubsubhubbub = c.get('database', 'pubsubhubbub') else: self.pubsubhubbub = None + self.package_docs_url = c.get('package_docs_url', + 'http://pythonhosted.org') self.mailhost = c.get('webui', 'mailhost') self.adminemail = c.get('webui', 'adminemail') self.replyto = c.get('webui', 'replyto') @@ -1777,7 +1777,7 @@ class Store: self.userip)) def docs_url(self, name): - '''Determine the local (packages.python.org) documentation URL, if any. + '''Determine the local (pythonhosted.org) documentation URL, if any. Returns the URL or '' if there are no docs. ''' @@ -1785,7 +1785,7 @@ class Store: path = [self.config.database_docs_dir, name.encode('utf8')] + sub + ['index.html'] if os.path.exists(os.path.join(*path)): - return '/'.join(['http://packages.python.org', name] + sub) + return '/'.join([self.config.package_docs_url, name] + sub) return '' def update_upload_times(self): diff --git a/templates/pkg_edit.pt b/templates/pkg_edit.pt index 77b1362..2a3cf87 100644 --- a/templates/pkg_edit.pt +++ b/templates/pkg_edit.pt @@ -75,7 +75,7 @@ uncheck the button below</p> enctype="multipart/form-data"> <input type="hidden" name=":action" value="pkg_edit" /> <input type="hidden" name="name" tal:attributes="value data/name" /> - + <!-- Apparently, we run TAL in XML mode, so the auto-remove feature for the checked attribute will not work --> <input tal:condition="data/autohide" type="checkbox" name="autohide" @@ -86,8 +86,8 @@ uncheck the button below</p> </form> <p>You can now host documentation at -<a tal:attributes="href string:http://packages.python.org/${data/name}" -tal:content="string:http://packages.python.org/${data/name}"></a>. To +<a tal:attributes="href string:http://pythonhosted.org/${data/name}" +tal:content="string:http://pythonhosted.org/${data/name}"></a>. To upload documentation, prepare a .zip file that is unpacked into this URL. Only static pages are supported. The zip file must have a top-level "index.html".</p> |