Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
repanier
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
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