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
3e9bbe25
Commit
3e9bbe25
authored
Jul 24, 2013
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make cms.dev environment work with manage.py
parent
8e125906
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
12 deletions
+4
-12
manage.py
+4
-12
No files found.
manage.py
View file @
3e9bbe25
...
...
@@ -31,8 +31,7 @@ def parse_args():
lms
.
add_argument
(
'-h'
,
'--help'
,
action
=
'store_true'
,
help
=
'show this help message and exit'
)
lms
.
add_argument
(
'--settings'
,
help
=
"Which django settings module to use. Will search for a submodule of lms.envs first, and "
"if that module doesn't exist, will search in sys.path. If not provided, the DJANGO_SETTINGS_MODULE "
help
=
"Which django settings module to use from inside of lms.envs. If not provided, the DJANGO_SETTINGS_MODULE "
"environment variable will be used if it is set, otherwise will default to lms.envs.dev"
)
lms
.
add_argument
(
'-s'
,
'--service-variant'
,
...
...
@@ -53,8 +52,7 @@ def parse_args():
)
cms
.
add_argument
(
'--settings'
,
help
=
"Which django settings module to use. Will search for a submodule of cms.envs first, and "
"if that module doesn't exist, will search in sys.path. If not provided, the DJANGO_SETTINGS_MODULE "
help
=
"Which django settings module to use from inside cms.envs. If not provided, the DJANGO_SETTINGS_MODULE "
"environment variable will be used if it is set, otherwise will default to cms.envs.dev"
)
cms
.
add_argument
(
'-h'
,
'--help'
,
action
=
'store_true'
,
help
=
'show this help message and exit'
)
cms
.
set_defaults
(
...
...
@@ -78,12 +76,7 @@ if __name__ == "__main__":
edx_args
,
django_args
=
parse_args
()
if
edx_args
.
settings
:
try
:
imp
.
find_module
(
edx_args
.
settings
,
[
edx_args
.
settings_base
])
os
.
environ
[
"DJANGO_SETTINGS_MODULE"
]
=
edx_args
.
settings_base
.
replace
(
'/'
,
'.'
)
+
"."
+
edx_args
.
settings
except
ImportError
:
imp
.
find_module
(
edx_args
.
settings
)
os
.
environ
[
"DJANGO_SETTINGS_MODULE"
]
=
edx_args
.
settings
os
.
environ
[
"DJANGO_SETTINGS_MODULE"
]
=
edx_args
.
settings_base
.
replace
(
'/'
,
'.'
)
+
"."
+
edx_args
.
settings
else
:
os
.
environ
.
setdefault
(
"DJANGO_SETTINGS_MODULE"
,
edx_args
.
default_settings
)
os
.
environ
.
setdefault
(
"SERVICE_VARIANT"
,
edx_args
.
service_variant
)
...
...
@@ -94,4 +87,4 @@ if __name__ == "__main__":
from
django.core.management
import
execute_from_command_line
execute_from_command_line
([
sys
.
argv
[
0
]]
+
django_args
)
\ No newline at end of file
execute_from_command_line
([
sys
.
argv
[
0
]]
+
django_args
)
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