Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
chris
repanier
Commits
a9d38a99
Commit
a9d38a99
authored
Apr 22, 2017
by
Patrick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Solve the reverted
https://github.com/divio/django-cms/pull/5860/
parent
3201817b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
repanier/big_blind_static.py
repanier/big_blind_static.py
+10
-3
No files found.
repanier/big_blind_static.py
View file @
a9d38a99
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__
,
""
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment