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
d132f2e1
Commit
d132f2e1
authored
Jan 28, 2013
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only put data repos in STATICFILES_DIRS if we're serving them from django (which is only in dev)
parent
c487e026
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
19 deletions
+22
-19
lms/envs/common.py
+1
-19
lms/envs/dev.py
+21
-0
No files found.
lms/envs/common.py
View file @
d132f2e1
...
...
@@ -266,24 +266,6 @@ STATICFILES_DIRS = [
COMMON_ROOT
/
"static"
,
PROJECT_ROOT
/
"static"
,
]
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'
))
]
# Locale/Internationalization
TIME_ZONE
=
'America/New_York'
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
...
...
@@ -468,7 +450,7 @@ PIPELINE_JS = {
'source_filenames'
:
sorted
(
set
(
rooted_glob
(
COMMON_ROOT
/
'static'
,
'coffee/src/**/*.coffee'
)
+
rooted_glob
(
PROJECT_ROOT
/
'static'
,
'coffee/src/**/*.coffee'
))
-
set
(
courseware_js
+
discussion_js
+
staff_grading_js
+
peer_grading_js
)
set
(
courseware_js
+
discussion_js
+
staff_grading_js
+
peer_grading_js
)
)
+
[
'js/form.ext.js'
,
'js/my_courses_dropdown.js'
,
...
...
lms/envs/dev.py
View file @
d132f2e1
...
...
@@ -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
()
...
...
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