]> git.ipfire.org Git - ipfire.org.git/commitdiff
www: Use a better caching for all sites.
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 3 Feb 2011 20:36:28 +0000 (21:36 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 3 Feb 2011 20:36:28 +0000 (21:36 +0100)
www/webapp/handlers_base.py

index 263b11c51ce52862cb14924fe1f5bff7406f7405..2f4c4b6726ecbe55a175c012b7f37f29116b751d 100644 (file)
@@ -67,6 +67,14 @@ class BaseHandler(tornado.web.RequestHandler):
                else:
                        return tornado.web.RequestHandler.get_error_html(self, status_code, **kwargs)
 
+       def static_url(self, path, static=True):
+               ret = tornado.web.RequestHandler.static_url(self, path)
+
+               if static:
+                       return "http://static.ipfire.org%s" % ret
+
+               return ret
+
        @property
        def accounts(self):
                return backend.Accounts()