Only put data repos in STATICFILES_DIRS if we're serving them from django (which is only in dev)
This commit is contained in:
@@ -106,6 +106,27 @@ VIRTUAL_UNIVERSITIES = []
|
||||
|
||||
COMMENTS_SERVICE_KEY = "PUT_YOUR_API_KEY_HERE"
|
||||
|
||||
############################## Course static files ##########################
|
||||
if os.path.isdir(DATA_DIR):
|
||||
# Add the full course repo if there is no static directory
|
||||
STATICFILES_DIRS += [
|
||||
# TODO (cpennington): When courses are stored in a database, this
|
||||
# should no longer be added to STATICFILES
|
||||
(course_dir, DATA_DIR / course_dir)
|
||||
for course_dir in os.listdir(DATA_DIR)
|
||||
if (os.path.isdir(DATA_DIR / course_dir) and
|
||||
not os.path.isdir(DATA_DIR / course_dir / 'static'))
|
||||
]
|
||||
# Otherwise, add only the static directory from the course dir
|
||||
STATICFILES_DIRS += [
|
||||
# TODO (cpennington): When courses are stored in a database, this
|
||||
# should no longer be added to STATICFILES
|
||||
(course_dir, DATA_DIR / course_dir / 'static')
|
||||
for course_dir in os.listdir(DATA_DIR)
|
||||
if (os.path.isdir(DATA_DIR / course_dir / 'static'))
|
||||
]
|
||||
|
||||
|
||||
################################# mitx revision string #####################
|
||||
|
||||
MITX_VERSION_STRING = os.popen('cd %s; git describe' % REPO_ROOT).read().strip()
|
||||
|
||||
Reference in New Issue
Block a user