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
af058c2c
Commit
af058c2c
authored
Mar 07, 2013
by
Christina Roberts
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1622 from MITx/fix/cdodge/static-url-allow-references-to-common
add comments
parents
cb70a0f9
c23c5cc3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
common/djangoapps/static_replace/__init__.py
+5
-1
No files found.
common/djangoapps/static_replace/__init__.py
View file @
af058c2c
...
...
@@ -87,11 +87,15 @@ def replace_static_urls(text, data_directory, course_namespace=None):
# In debug mode, if we can find the url as is,
if
settings
.
DEBUG
and
finders
.
find
(
rest
,
True
):
return
original
# course_namespace is not None, then use studio style urls
#
if we're running with a MongoBacked store
course_namespace is not None, then use studio style urls
elif
course_namespace
is
not
None
and
not
isinstance
(
modulestore
(),
XMLModuleStore
):
# first look in the static file pipeline and see if we are trying to reference
# a piece of static content which is in the mitx repo (e.g. JS associated with an xmodule)
if
staticfiles_storage
.
exists
(
rest
):
url
=
staticfiles_storage
.
url
(
rest
)
else
:
# if not, then assume it's courseware specific content and then look in the
# Mongo-backed database
url
=
StaticContent
.
convert_legacy_static_url
(
rest
,
course_namespace
)
# Otherwise, look the file up in staticfiles_storage, and append the data directory if needed
else
:
...
...
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