From 3d540c40eebfb5303d67b45a99911a03c093a553 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Thu, 3 Feb 2011 21:36:28 +0100 Subject: [PATCH] www: Use a better caching for all sites. --- www/webapp/handlers_base.py | 8 ++++++++ 1 file changed, 8 insertions(+) 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() -- 2.47.3