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
62f17909
Commit
62f17909
authored
Aug 10, 2017
by
bmedx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix several RemovedInDjango19Warning by re-ordering INSTALLED_APPS
- PLAT-1642 - PLAT-1643
parent
7f32e03d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
75 additions
and
55 deletions
+75
-55
cms/envs/common.py
+38
-29
lms/envs/common.py
+37
-26
No files found.
cms/envs/common.py
View file @
62f17909
...
...
@@ -880,7 +880,10 @@ VIDEO_UPLOAD_PIPELINE = {
############################ APPS #####################################
INSTALLED_APPS
=
(
# The order of INSTALLED_APPS is important, when adding new apps here
# remember to check that you are not creating new
# RemovedInDjango19Warnings in the test logs.
INSTALLED_APPS
=
[
# Standard apps
'django.contrib.auth'
,
'django.contrib.contenttypes'
,
...
...
@@ -908,6 +911,12 @@ INSTALLED_APPS = (
# Testing
'django_nose'
,
# Bookmarks
'openedx.core.djangoapps.bookmarks'
,
# Video module configs (This will be moved to Video once it becomes an XBlock)
'openedx.core.djangoapps.video_config'
,
# For CMS
'contentstore.apps.ContentstoreConfig'
,
...
...
@@ -983,6 +992,12 @@ INSTALLED_APPS = (
'openedx.core.djangoapps.content.course_structures.apps.CourseStructuresConfig'
,
'openedx.core.djangoapps.content.block_structure.apps.BlockStructureConfig'
,
# edx-milestones service
'milestones'
,
# Self-paced course configuration
'openedx.core.djangoapps.self_paced'
,
# Coursegraph
'openedx.core.djangoapps.coursegraph.apps.CoursegraphConfig'
,
...
...
@@ -994,18 +1009,9 @@ INSTALLED_APPS = (
# edX Proctoring
'edx_proctoring'
,
# Bookmarks
'openedx.core.djangoapps.bookmarks'
,
# Catalog integration
'openedx.core.djangoapps.catalog'
,
# Self-paced course configuration
'openedx.core.djangoapps.self_paced'
,
# Video module configs (This will be moved to Video once it becomes an XBlock)
'openedx.core.djangoapps.video_config'
,
# django-oauth2-provider (deprecated)
'provider'
,
'provider.oauth2'
,
...
...
@@ -1022,9 +1028,6 @@ INSTALLED_APPS = (
# Microsite configuration application
'microsite_configuration'
,
# edx-milestones service
'milestones'
,
# Static i18n support
'statici18n'
,
...
...
@@ -1058,7 +1061,7 @@ INSTALLED_APPS = (
# DRF filters
'django_filters'
,
)
]
################# EDX MARKETING SITE ##################################
...
...
@@ -1147,32 +1150,33 @@ MAX_FAILED_LOGIN_ATTEMPTS_LOCKOUT_PERIOD_SECS = 15 * 60
### Apps only installed in some instances
# The order of INSTALLED_APPS matters, so this tuple is the app name and the item in INSTALLED_APPS
# that this app should be inserted *before*. A None here means it should be appended to the list.
OPTIONAL_APPS
=
(
'mentoring'
,
'problem_builder'
,
'edx_sga'
,
(
'mentoring'
,
None
)
,
(
'problem_builder'
,
'openedx.core.djangoapps.content.course_overviews'
)
,
(
'edx_sga'
,
None
)
,
# edx-ora2
'submissions'
,
'openassessment'
,
'openassessment.assessment'
,
'openassessment.fileupload'
,
'openassessment.workflow'
,
'openassessment.xblock'
,
(
'submissions'
,
'openedx.core.djangoapps.content.course_overviews'
)
,
(
'openassessment'
,
'openedx.core.djangoapps.content.course_overviews'
)
,
(
'openassessment.assessment'
,
'openedx.core.djangoapps.content.course_overviews'
)
,
(
'openassessment.fileupload'
,
'openedx.core.djangoapps.content.course_overviews'
)
,
(
'openassessment.workflow'
,
'openedx.core.djangoapps.content.course_overviews'
)
,
(
'openassessment.xblock'
,
'openedx.core.djangoapps.content.course_overviews'
)
,
# edxval
'edxval'
,
(
'edxval'
,
'openedx.core.djangoapps.content.course_overviews'
)
,
# Organizations App (http://github.com/edx/edx-organizations)
'organizations'
,
(
'organizations'
,
None
)
,
# Enterprise App (http://github.com/edx/edx-enterprise)
'enterprise'
,
(
'enterprise'
,
None
)
,
)
for
app_name
in
OPTIONAL_APPS
:
for
app_name
,
insert_before
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
...
...
@@ -1183,7 +1187,12 @@ for app_name in OPTIONAL_APPS:
__import__
(
app_name
)
except
ImportError
:
continue
INSTALLED_APPS
+=
(
app_name
,)
try
:
INSTALLED_APPS
.
insert
(
INSTALLED_APPS
.
index
(
insert_before
),
app_name
)
except
(
IndexError
,
ValueError
):
INSTALLED_APPS
+=
(
app_name
,)
### ADVANCED_SECURITY_CONFIG
# Empty by default
...
...
lms/envs/common.py
View file @
62f17909
...
...
@@ -1965,7 +1965,10 @@ YOUTUBE_API_KEY = None
################################### APPS ######################################
INSTALLED_APPS
=
(
# The order of INSTALLED_APPS is important, when adding new apps here
# remember to check that you are not creating new
# RemovedInDjango19Warnings in the test logs.
INSTALLED_APPS
=
[
# Standard ones that are always installed...
'django.contrib.auth'
,
'django.contrib.contenttypes'
,
...
...
@@ -2012,6 +2015,12 @@ INSTALLED_APPS = (
# Site configuration for theming and behavioral modification
'openedx.core.djangoapps.site_configuration'
,
# Video module configs (This will be moved to Video once it becomes an XBlock)
'openedx.core.djangoapps.video_config'
,
# Bookmarks
'openedx.core.djangoapps.bookmarks'
,
# Our courseware
'courseware'
,
'student'
,
...
...
@@ -2158,6 +2167,7 @@ INSTALLED_APPS = (
'openedx.core.djangoapps.content.block_structure.apps.BlockStructureConfig'
,
'lms.djangoapps.course_blocks'
,
# Coursegraph
'openedx.core.djangoapps.coursegraph.apps.CoursegraphConfig'
,
...
...
@@ -2181,9 +2191,6 @@ INSTALLED_APPS = (
'xblock_django'
,
# Bookmarks
'openedx.core.djangoapps.bookmarks'
,
# programs support
'openedx.core.djangoapps.programs'
,
...
...
@@ -2213,9 +2220,6 @@ INSTALLED_APPS = (
# Verified Track Content Cohorting (Beta feature that will hopefully be removed)
'openedx.core.djangoapps.verified_track_content'
,
# Video module configs (This will be moved to Video once it becomes an XBlock)
'openedx.core.djangoapps.video_config'
,
# Learner's dashboard
'learner_dashboard'
,
...
...
@@ -2255,7 +2259,7 @@ INSTALLED_APPS = (
# DRF filters
'django_filters'
,
)
]
######################### CSRF #########################################
...
...
@@ -2792,37 +2796,40 @@ ALL_LANGUAGES = (
### Apps only installed in some instances
# The order of INSTALLED_APPS matters, so this tuple is the app name and the item in INSTALLED_APPS
# that this app should be inserted *before*. A None here means it should be appended to the list.
OPTIONAL_APPS
=
(
'mentoring'
,
'problem_builder'
,
'edx_sga'
,
(
'mentoring'
,
None
)
,
(
'problem_builder'
,
'openedx.core.djangoapps.content.course_overviews'
)
,
(
'edx_sga'
,
None
)
,
# edx-ora2
'submissions'
,
'openassessment'
,
'openassessment.assessment'
,
'openassessment.fileupload'
,
'openassessment.workflow'
,
'openassessment.xblock'
,
(
'submissions'
,
'openedx.core.djangoapps.content.course_overviews'
)
,
(
'openassessment'
,
'openedx.core.djangoapps.content.course_overviews'
)
,
(
'openassessment.assessment'
,
'openedx.core.djangoapps.content.course_overviews'
)
,
(
'openassessment.fileupload'
,
'openedx.core.djangoapps.content.course_overviews'
)
,
(
'openassessment.workflow'
,
'openedx.core.djangoapps.content.course_overviews'
)
,
(
'openassessment.xblock'
,
'openedx.core.djangoapps.content.course_overviews'
)
,
# edxval
'edxval'
,
(
'edxval'
,
'openedx.core.djangoapps.content.course_overviews'
)
,
# edX Proctoring
'edx_proctoring'
,
(
'edx_proctoring'
,
None
)
,
# Organizations App (http://github.com/edx/edx-organizations)
'organizations'
,
(
'organizations'
,
None
)
,
# Enterprise Apps (http://github.com/edx/edx-enterprise)
'enterprise'
,
'integrated_channels.integrated_channel'
,
'integrated_channels.sap_success_factors'
,
(
'enterprise'
,
None
),
(
'integrated_channels.integrated_channel'
,
None
),
(
'integrated_channels.sap_success_factors'
,
None
),
# Required by the Enterprise App
'django_object_actions'
,
# https://github.com/crccheck/django-object-actions
(
'django_object_actions'
,
None
)
,
# https://github.com/crccheck/django-object-actions
)
for
app_name
in
OPTIONAL_APPS
:
for
app_name
,
insert_before
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
...
...
@@ -2833,7 +2840,11 @@ for app_name in OPTIONAL_APPS:
__import__
(
app_name
)
except
ImportError
:
continue
INSTALLED_APPS
+=
(
app_name
,)
try
:
INSTALLED_APPS
.
insert
(
INSTALLED_APPS
.
index
(
insert_before
),
app_name
)
except
(
IndexError
,
ValueError
):
INSTALLED_APPS
+=
(
app_name
,)
### ADVANCED_SECURITY_CONFIG
# Empty by default
...
...
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