Skip to content
Snippets Groups Projects
Commit b186d25f authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[ui][templatetags][fingerprint] Re-implemented FingerPrintedFilesNode

StaticFilesNode was removed so refactored the code to still
return the same data as before.
parent 24811bc6
No related branches found
No related tags found
2 merge requests!2551.4.x,!238Upgrade to django 1.11
......@@ -26,7 +26,9 @@
###############################################################################
from django import template
from django.contrib.staticfiles.templatetags.staticfiles import StaticFilesNode
from django.templatetags.static import StaticNode
from django.contrib.staticfiles.storage import staticfiles_storage
from ... import __version__
......@@ -36,10 +38,12 @@ register = template.Library()
#--------------------------------------------------
class FingerprintedFilesNode(StaticFilesNode):
class FingerprintedFilesNode(StaticNode):
def url(self, context):
return super(FingerprintedFilesNode, self).url(context) + '?v' + __version__
path = self.path.resolve(context)
url = staticfiles_storage.url(path)
return url + '?v' + __version__
#--------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment