From: Michael Tremer Date: Thu, 3 Feb 2011 20:36:28 +0000 (+0100) Subject: www: Use a better caching for all sites. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3d540c40eebfb5303d67b45a99911a03c093a553;p=ipfire.org.git www: Use a better caching for all sites. --- diff --git a/www/webapp/handlers_base.py b/www/webapp/handlers_base.py index 263b11c5..2f4c4b67 100644 --- a/www/webapp/handlers_base.py +++ b/www/webapp/handlers_base.py @@ -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()