Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
code.vt.edu will be down for maintenance from 0530-0630 EDT Wednesday, March 26th
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
bde95135
Commit
bde95135
authored
11 years ago
by
Xavier Antoviaque
Committed by
Calen Pennington
11 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Only add mentoring application to INSTALLED_APPS when in virtualenv
parent
bdfd81d2
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cms/envs/common.py
+19
-10
19 additions, 10 deletions
cms/envs/common.py
lms/envs/common.py
+19
-10
19 additions, 10 deletions
lms/envs/common.py
with
38 additions
and
20 deletions
cms/envs/common.py
+
19
−
10
View file @
bde95135
...
...
@@ -24,6 +24,7 @@ Longer TODO:
# want to import all variables from base settings files
# pylint: disable=W0401, W0611, W0614
import
imp
import
sys
import
lms.envs.common
from
lms.envs.common
import
(
...
...
@@ -467,9 +468,6 @@ INSTALLED_APPS = (
# for course creator table
'
django.contrib.admin
'
,
# XBlocks containing migrations
'
mentoring
'
,
# for managing course modes
'
course_modes
'
,
...
...
@@ -536,11 +534,22 @@ MAX_FAILED_LOGIN_ATTEMPTS_ALLOWED = 5
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
:
import
edx_jsdraw
except
ImportError
:
pass
else
:
INSTALLED_APPS
+=
(
'
edx_jsdraw
'
,)
for
app_name
in
OPTIONAL_APPS
:
# First attempt to only find the module rather than actually importing it,
# to avoid circular references - only try to import if it can't be found
# by find_module, which doesn't work with import hooks
try
:
imp
.
find_module
(
app_name
)
except
ImportError
:
try
:
__import__
(
app_name
)
except
ImportError
:
continue
INSTALLED_APPS
+=
(
app_name
,)
This diff is collapsed.
Click to expand it.
lms/envs/common.py
+
19
−
10
View file @
bde95135
...
...
@@ -26,6 +26,7 @@ Longer TODO:
import
sys
import
os
import
imp
import
json
from
path
import
path
...
...
@@ -1163,9 +1164,6 @@ INSTALLED_APPS = (
'
reverification
'
,
'
embargo
'
,
# XBlocks containing migrations
'
mentoring
'
,
)
######################### MARKETING SITE ###############################
...
...
@@ -1458,11 +1456,22 @@ ALL_LANGUAGES = (
)
### JSdraw (only installed in some instances)
### Apps only installed in some instances
OPTIONAL_APPS
=
(
'
edx_jsdraw
'
,
'
mentoring
'
,
)
try
:
import
edx_jsdraw
except
ImportError
:
pass
else
:
INSTALLED_APPS
+=
(
'
edx_jsdraw
'
,)
for
app_name
in
OPTIONAL_APPS
:
# First attempt to only find the module rather than actually importing it,
# to avoid circular references - only try to import if it can't be found
# by find_module, which doesn't work with import hooks
try
:
imp
.
find_module
(
app_name
)
except
ImportError
:
try
:
__import__
(
app_name
)
except
ImportError
:
continue
INSTALLED_APPS
+=
(
app_name
,)
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment