aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'web/controller.py')
-rw-r--r--web/controller.py21
1 files changed, 17 insertions, 4 deletions
diff --git a/web/controller.py b/web/controller.py
index 0664d78..03b6d16 100644
--- a/web/controller.py
+++ b/web/controller.py
@@ -32,7 +32,10 @@ class Root(object):
day_list = latest_per_day(latest_entries, left_daycount)
- updated = last_modified(entry_filter.latest_entry())
+ latest_entry = entry_filter.latest_entry()
+ updated = last_modified(latest_entry)
+ http_lastmodified = time.strftime('%a, %d %b %Y %H:%M:%S GMT',time.gmtime(latest_entry[1]))
+ cherrypy.response.headers['Last-Modified'] = http_lastmodified
return template.render(arches = self.arches,
daylist = day_list, center_pkgs = center_pkgs,
lastupdate = updated)
@@ -71,7 +74,10 @@ class Root(object):
day_list = latest_per_day(left_entrylist, left_daycount)
- updated = last_modified(entry_filter.latest_entry())
+ latest_entry = entry_filter.latest_entry()
+ updated = last_modified(latest_entry)
+ http_lastmodified = time.strftime('%a, %d %b %Y %H:%M:%S GMT',time.gmtime(latest_entry[1]))
+ cherrypy.response.headers['Last-Modified'] = http_lastmodified
return template.render(arches = self.arches,
daylist = day_list, center_pkgs = center_pkgs,
lastupdate = updated)
@@ -111,7 +117,10 @@ class Root(object):
day_list = latest_per_day(left_entrylist, left_daycount)
- updated = last_modified(entry_filter.latest_entry())
+ latest_entry = entry_filter.latest_entry()
+ updated = last_modified(latest_entry)
+ http_lastmodified = time.strftime('%a, %d %b %Y %H:%M:%S GMT',time.gmtime(latest_entry[1]))
+ cherrypy.response.headers['Last-Modified'] = http_lastmodified
return template.render(arches = self.arches,
daylist = day_list, center_pkgs = center_pkgs,
lastupdate = updated)
@@ -153,7 +162,10 @@ class Root(object):
day_list = latest_per_day(left_entrylist, left_daycount)
- updated = last_modified(entry_filter.latest_entry())
+ latest_entry = entry_filter.latest_entry()
+ updated = last_modified(latest_entry)
+ http_lastmodified = time.strftime('%a, %d %b %Y %H:%M:%S GMT',time.gmtime(latest_entry[1]))
+ cherrypy.response.headers['Last-Modified'] = http_lastmodified
return template.render(arches = self.arches,
daylist = day_list, center_pkgs = center_pkgs,
lastupdate = updated)
@@ -191,6 +203,7 @@ def main():
# site-wide config
cherrypy.config.update({
+ 'log.error_file': '/tmp/cherrypy_packages2.gentoo.log',
#'tools.caching.on': True,
#'tools.caching.cache_class': cherrypy.lib.caching.MemoryCache,
'tools.decode.on': True,