add tests of static_asset_path and importing with no static;

fix (again) static_replace to work with static_asset_path
This commit is contained in:
ichuang
2013-08-20 23:30:26 -04:00
parent 91bf6ad86d
commit 95952bd693
19 changed files with 295 additions and 3 deletions

View File

@@ -117,7 +117,7 @@ def replace_static_urls(text, data_directory, course_id=None, static_asset_path=
if settings.DEBUG and finders.find(rest, True):
return original
# if we're running with a MongoBacked store course_namespace is not None, then use studio style urls
elif course_id and modulestore().get_modulestore_type(course_id) != XML_MODULESTORE_TYPE:
elif (not static_asset_path) and course_id and modulestore().get_modulestore_type(course_id) != XML_MODULESTORE_TYPE:
# 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):