Loading django/contrib/staticfiles/templatetags/staticfiles.py +5 −5 Original line number Diff line number Diff line Loading @@ -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') Loading @@ -31,7 +35,3 @@ def do_static(parser, token): """ return StaticFilesNode.handle_token(parser, token) def static(path): return staticfiles_storage.url(path) Loading
django/contrib/staticfiles/templatetags/staticfiles.py +5 −5 Original line number Diff line number Diff line Loading @@ -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') Loading @@ -31,7 +35,3 @@ def do_static(parser, token): """ return StaticFilesNode.handle_token(parser, token) def static(path): return staticfiles_storage.url(path)