Refactor Django App Plugins to allow for additional features

This commit is contained in:
Nimisha Asthagiri
2018-01-13 16:26:21 -05:00
parent c24d8c1b28
commit 7286c64e18
22 changed files with 394 additions and 372 deletions

View File

@@ -562,8 +562,8 @@ COMPLETION_VIDEO_COMPLETE_PERCENTAGE = ENV_TOKENS.get(
####################### Plugin Settings ##########################
from openedx.core.djangolib.django_plugins import DjangoAppRegistry, ProjectType, SettingsType
DjangoAppRegistry.add_plugin_settings(__name__, ProjectType.CMS, SettingsType.AWS)
from openedx.core.djangoapps.plugins import plugin_settings, constants as plugin_constants
plugin_settings.add_plugins(__name__, plugin_constants.ProjectType.CMS, plugin_constants.SettingsType.AWS)
########################## Derive Any Derived Settings #######################

View File

@@ -1501,6 +1501,6 @@ COMPLETION_VIDEO_COMPLETE_PERCENTAGE = 0.95
############## Installed Django Apps #########################
from openedx.core.djangolib.django_plugins import DjangoAppRegistry, ProjectType, SettingsType
INSTALLED_APPS.extend(DjangoAppRegistry.get_plugin_apps(ProjectType.CMS))
DjangoAppRegistry.add_plugin_settings(__name__, ProjectType.CMS, SettingsType.COMMON)
from openedx.core.djangoapps.plugins import plugin_apps, plugin_settings, constants as plugin_constants
INSTALLED_APPS.extend(plugin_apps.get_apps(plugin_constants.ProjectType.CMS))
plugin_settings.add_plugins(__name__, plugin_constants.ProjectType.CMS, plugin_constants.SettingsType.COMMON)

View File

@@ -144,8 +144,8 @@ JWT_AUTH.update({
})
#####################################################################
from openedx.core.djangolib.django_plugins import DjangoAppRegistry, ProjectType, SettingsType
DjangoAppRegistry.add_plugin_settings(__name__, ProjectType.CMS, SettingsType.DEVSTACK)
from openedx.core.djangoapps.plugins import plugin_settings, constants as plugin_constants
plugin_settings.add_plugins(__name__, plugin_constants.ProjectType.CMS, plugin_constants.SettingsType.DEVSTACK)
###############################################################################
# See if the developer has any local overrides.

View File

@@ -355,8 +355,8 @@ VIDEO_TRANSCRIPTS_SETTINGS = dict(
####################### Plugin Settings ##########################
from openedx.core.djangolib.django_plugins import DjangoAppRegistry, ProjectType, SettingsType
DjangoAppRegistry.add_plugin_settings(__name__, ProjectType.CMS, SettingsType.TEST)
from openedx.core.djangoapps.plugins import plugin_settings, constants as plugin_constants
plugin_settings.add_plugins(__name__, plugin_constants.ProjectType.CMS, plugin_constants.SettingsType.TEST)
########################## Derive Any Derived Settings #######################

View File

@@ -257,5 +257,5 @@ urlpatterns += [
url(r'^500$', handler500),
]
from openedx.core.djangolib.django_plugins import DjangoAppRegistry, ProjectType
urlpatterns.extend(DjangoAppRegistry.get_plugin_url_patterns(ProjectType.CMS))
from openedx.core.djangoapps.plugins import constants as plugin_constants, plugin_urls
urlpatterns.extend(plugin_urls.get_patterns(plugin_constants.ProjectType.CMS))