diff options
author | Donald Stufft <donald@stufft.io> | 2013-05-18 20:10:10 -0400 |
---|---|---|
committer | Donald Stufft <donald@stufft.io> | 2013-05-18 20:10:10 -0400 |
commit | 1a760ece9a057e67892ddef97ea1b1d91a695f3b (patch) | |
tree | 98542dd5e3d78489389d6ca8b78aeb9730e7c59a /webui.py | |
parent | 9afd3c33b514373c7660953c04c479fd612667dc (diff) | |
download | decorator-1a760ece9a057e67892ddef97ea1b1d91a695f3b.tar.gz |
Add the api-version metatag to the simple index
This allows clients to determine what version of the index they
are accessing.
Diffstat (limited to 'webui.py')
-rw-r--r-- | webui.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -662,7 +662,7 @@ class WebUI: raise Redirect, self.config.simple_script + '/' + names[0] raise NotFound, path + " does not have any releases" html = [] - html.append("""<html><head><title>Links for %s</title></head>""" + html.append("""<html><head><title>Links for %s</title><meta name="api-version" value="2"></head>""" % cgi.escape(path)) html.append("<body><h1>Links for %s</h1>" % cgi.escape(path)) for href, rel, text in urls: @@ -717,7 +717,7 @@ class WebUI: accept_encoding = self.get_accept_encoding(('identity', 'gzip')) if path=='/': html = [] - html.append("<html><head><title>Simple Index</title></head>") + html.append('<html><head><title>Simple Index</title><meta name="api-version" value="2"></head>') html.append("<body>\n") for name in self.store.get_packages_utf8(): qname = urllib.quote(name) |