Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
2b637fe5
Commit
2b637fe5
authored
Feb 07, 2013
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix loads of local static files when running in dev mode
parent
a6b35853
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
common/djangoapps/static_replace/__init__.py
+4
-0
No files found.
common/djangoapps/static_replace/__init__.py
View file @
2b637fe5
...
...
@@ -77,9 +77,13 @@ def replace_static_urls(text, data_directory, course_namespace=None):
# course_namespace is not None, then use studio style urls
if
course_namespace
is
not
None
and
not
isinstance
(
modulestore
(),
XMLModuleStore
):
url
=
StaticContent
.
convert_legacy_static_url
(
rest
,
course_namespace
)
# In debug mode, if we can find the url as is,
elif
settings
.
DEBUG
and
finders
.
find
(
rest
,
True
):
return
original
# Otherwise, look the file up in staticfiles_storage, and append the data directory if needed
else
:
course_path
=
"/"
.
join
((
data_directory
,
rest
))
try
:
if
staticfiles_storage
.
exists
(
rest
):
url
=
staticfiles_storage
.
url
(
rest
)
...
...
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