From a42e04f77de9fcec673eb78d05fdc26a6ab74cf6 Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Wed, 15 Jan 2014 12:53:19 +0000 Subject: [PATCH] Used the proxied call to staticfiles_storage.url --- django/contrib/staticfiles/templatetags/staticfiles.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/django/contrib/staticfiles/templatetags/staticfiles.py b/django/contrib/staticfiles/templatetags/staticfiles.py index ab922757e20..b5466cab319 100644 --- a/django/contrib/staticfiles/templatetags/staticfiles.py +++ b/django/contrib/staticfiles/templatetags/staticfiles.py @@ -5,11 +5,15 @@ from django.contrib.staticfiles.storage import staticfiles_storage register = template.Library() +def static(path): + return staticfiles_storage.url(path) + + class StaticFilesNode(StaticNode): def url(self, context): path = self.path.resolve(context) - return staticfiles_storage.url(path) + return static(path) @register.tag('static') @@ -31,7 +35,3 @@ def do_static(parser, token): """ return StaticFilesNode.handle_token(parser, token) - - -def static(path): - return staticfiles_storage.url(path)