Commit a9d38a99 authored by Patrick's avatar Patrick
parent 3201817b
from django.contrib.staticfiles.storage import ManifestStaticFilesStorage
from cms.utils.urlutils import static_with_version
import cms
__version__ = "/%s" % cms.__version__
class BigBlindManifestStaticFilesStorage(ManifestStaticFilesStorage):
def url(self, name, force=True):
def url(self, context, force=True):
"""
Override .url to use hashed url in development
"""
return super(ManifestStaticFilesStorage, self).url(name, True)
\ No newline at end of file
try:
return super(ManifestStaticFilesStorage, self).url(context, True)
except ValueError:
# Solve the reverted https://github.com/divio/django-cms/pull/5860/
context = static_with_version(context)
return super(ManifestStaticFilesStorage, self).url(context, True).replace(__version__, "")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment