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
62628f6b
Commit
62628f6b
authored
Mar 05, 2014
by
Xavier Antoviaque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only add mentoring application to INSTALLED_APPS when in virtualenv
parent
0db4a899
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
20 deletions
+38
-20
cms/envs/common.py
+19
-10
lms/envs/common.py
+19
-10
No files found.
cms/envs/common.py
View file @
62628f6b
...
@@ -24,6 +24,7 @@ Longer TODO:
...
@@ -24,6 +24,7 @@ Longer TODO:
# want to import all variables from base settings files
# want to import all variables from base settings files
# pylint: disable=W0401, W0611, W0614
# pylint: disable=W0401, W0611, W0614
import
imp
import
sys
import
sys
import
lms.envs.common
import
lms.envs.common
from
lms.envs.common
import
(
from
lms.envs.common
import
(
...
@@ -467,9 +468,6 @@ INSTALLED_APPS = (
...
@@ -467,9 +468,6 @@ INSTALLED_APPS = (
# for course creator table
# for course creator table
'django.contrib.admin'
,
'django.contrib.admin'
,
# XBlocks containing migrations
'mentoring'
,
# for managing course modes
# for managing course modes
'course_modes'
,
'course_modes'
,
...
@@ -536,11 +534,22 @@ MAX_FAILED_LOGIN_ATTEMPTS_ALLOWED = 5
...
@@ -536,11 +534,22 @@ MAX_FAILED_LOGIN_ATTEMPTS_ALLOWED = 5
MAX_FAILED_LOGIN_ATTEMPTS_LOCKOUT_PERIOD_SECS
=
15
*
60
MAX_FAILED_LOGIN_ATTEMPTS_LOCKOUT_PERIOD_SECS
=
15
*
60
### JSdraw (only installed in some instances)
### Apps only installed in some instances
OPTIONAL_APPS
=
(
'edx_jsdraw'
,
'mentoring'
,
)
try
:
for
app_name
in
OPTIONAL_APPS
:
import
edx_jsdraw
# First attempt to only find the module rather than actually importing it,
except
ImportError
:
# to avoid circular references - only try to import if it can't be found
pass
# by find_module, which doesn't work with import hooks
else
:
try
:
INSTALLED_APPS
+=
(
'edx_jsdraw'
,)
imp
.
find_module
(
app_name
)
except
ImportError
:
try
:
__import__
(
app_name
)
except
ImportError
:
continue
INSTALLED_APPS
+=
(
app_name
,)
lms/envs/common.py
View file @
62628f6b
...
@@ -26,6 +26,7 @@ Longer TODO:
...
@@ -26,6 +26,7 @@ Longer TODO:
import
sys
import
sys
import
os
import
os
import
imp
import
json
import
json
from
path
import
path
from
path
import
path
...
@@ -1163,9 +1164,6 @@ INSTALLED_APPS = (
...
@@ -1163,9 +1164,6 @@ INSTALLED_APPS = (
'reverification'
,
'reverification'
,
'embargo'
,
'embargo'
,
# XBlocks containing migrations
'mentoring'
,
)
)
######################### MARKETING SITE ###############################
######################### MARKETING SITE ###############################
...
@@ -1447,11 +1445,22 @@ ALL_LANGUAGES = (
...
@@ -1447,11 +1445,22 @@ ALL_LANGUAGES = (
)
)
### JSdraw (only installed in some instances)
### Apps only installed in some instances
OPTIONAL_APPS
=
(
'edx_jsdraw'
,
'mentoring'
,
)
try
:
for
app_name
in
OPTIONAL_APPS
:
import
edx_jsdraw
# First attempt to only find the module rather than actually importing it,
except
ImportError
:
# to avoid circular references - only try to import if it can't be found
pass
# by find_module, which doesn't work with import hooks
else
:
try
:
INSTALLED_APPS
+=
(
'edx_jsdraw'
,)
imp
.
find_module
(
app_name
)
except
ImportError
:
try
:
__import__
(
app_name
)
except
ImportError
:
continue
INSTALLED_APPS
+=
(
app_name
,)
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