summaryrefslogtreecommitdiff
path: root/webui.py
diff options
context:
space:
mode:
authorDonald Stufft <donald@stufft.io>2013-05-18 20:10:10 -0400
committerDonald Stufft <donald@stufft.io>2013-05-18 20:10:10 -0400
commit1a760ece9a057e67892ddef97ea1b1d91a695f3b (patch)
tree98542dd5e3d78489389d6ca8b78aeb9730e7c59a /webui.py
parent9afd3c33b514373c7660953c04c479fd612667dc (diff)
downloaddecorator-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.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/webui.py b/webui.py
index e072c08..6cf9ab5 100644
--- a/webui.py
+++ b/webui.py
@@ -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)