Commit a42e04f7 authored by Thomas Grainger's avatar Thomas Grainger Committed by Tim Graham
Browse files

Used the proxied call to staticfiles_storage.url

parent 9ab798a8
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -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)