Merge pull request #17093 from edx/arch/django-app-plugin
Django App Plugins
This commit is contained in:
@@ -4,6 +4,8 @@ Configuration for the ace_common Django app.
|
||||
from django.apps import AppConfig
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from openedx.core.djangolib.django_plugins import ProjectType, PluginSettings, SettingsType
|
||||
|
||||
|
||||
class AceCommonConfig(AppConfig):
|
||||
"""
|
||||
@@ -11,3 +13,13 @@ class AceCommonConfig(AppConfig):
|
||||
"""
|
||||
name = 'openedx.core.djangoapps.ace_common'
|
||||
verbose_name = _('ACE Common')
|
||||
|
||||
plugin_app = {
|
||||
PluginSettings.CONFIG: {
|
||||
ProjectType.LMS: {
|
||||
SettingsType.AWS: {PluginSettings.RELATIVE_PATH: u'settings.aws'},
|
||||
SettingsType.COMMON: {PluginSettings.RELATIVE_PATH: u'settings.common'},
|
||||
SettingsType.DEVSTACK: {PluginSettings.RELATIVE_PATH: u'settings.common'},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
16
openedx/core/djangoapps/ace_common/settings/aws.py
Normal file
16
openedx/core/djangoapps/ace_common/settings/aws.py
Normal file
@@ -0,0 +1,16 @@
|
||||
def plugin_settings(settings):
|
||||
settings.ACE_ENABLED_CHANNELS = settings.ENV_TOKENS.get('ACE_ENABLED_CHANNELS', settings.ACE_ENABLED_CHANNELS)
|
||||
settings.ACE_ENABLED_POLICIES = settings.ENV_TOKENS.get('ACE_ENABLED_POLICIES', settings.ACE_ENABLED_POLICIES)
|
||||
settings.ACE_CHANNEL_SAILTHRU_DEBUG = settings.ENV_TOKENS.get(
|
||||
'ACE_CHANNEL_SAILTHRU_DEBUG', settings.ACE_CHANNEL_SAILTHRU_DEBUG,
|
||||
)
|
||||
settings.ACE_CHANNEL_SAILTHRU_TEMPLATE_NAME = settings.ENV_TOKENS.get(
|
||||
'ACE_CHANNEL_SAILTHRU_TEMPLATE_NAME', settings.ACE_CHANNEL_SAILTHRU_TEMPLATE_NAME,
|
||||
)
|
||||
settings.ACE_CHANNEL_SAILTHRU_API_KEY = settings.AUTH_TOKENS.get(
|
||||
'ACE_CHANNEL_SAILTHRU_API_KEY', settings.ACE_CHANNEL_SAILTHRU_API_KEY,
|
||||
)
|
||||
settings.ACE_CHANNEL_SAILTHRU_API_SECRET = settings.AUTH_TOKENS.get(
|
||||
'ACE_CHANNEL_SAILTHRU_API_SECRET', settings.ACE_CHANNEL_SAILTHRU_API_SECRET,
|
||||
)
|
||||
settings.ACE_ROUTING_KEY = settings.ENV_TOKENS.get('ACE_ROUTING_KEY', settings.ACE_ROUTING_KEY)
|
||||
15
openedx/core/djangoapps/ace_common/settings/common.py
Normal file
15
openedx/core/djangoapps/ace_common/settings/common.py
Normal file
@@ -0,0 +1,15 @@
|
||||
def plugin_settings(settings):
|
||||
settings.ACE_ENABLED_CHANNELS = [
|
||||
'file_email'
|
||||
]
|
||||
settings.ACE_ENABLED_POLICIES = [
|
||||
'bulk_email_optout'
|
||||
]
|
||||
settings.ACE_CHANNEL_SAILTHRU_DEBUG = True
|
||||
settings.ACE_CHANNEL_SAILTHRU_TEMPLATE_NAME = 'Automated Communication Engine Email'
|
||||
settings.ACE_CHANNEL_SAILTHRU_API_KEY = None
|
||||
settings.ACE_CHANNEL_SAILTHRU_API_SECRET = None
|
||||
|
||||
settings.ACE_ROUTING_KEY = 'edx.core.low'
|
||||
|
||||
settings.FEATURES['test_django_plugin'] = True
|
||||
@@ -5,7 +5,7 @@ PluginManager.
|
||||
from base64 import b64encode
|
||||
from hashlib import sha1
|
||||
|
||||
from openedx.core.lib.api.plugins import PluginManager
|
||||
from openedx.core.lib.plugins import PluginManager
|
||||
from openedx.core.lib.cache_utils import memoized
|
||||
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@ class SchedulesConfig(AppConfig):
|
||||
name = 'openedx.core.djangoapps.schedules'
|
||||
verbose_name = _('Schedules')
|
||||
|
||||
plugin_app = {}
|
||||
|
||||
def ready(self):
|
||||
# noinspection PyUnresolvedReferences
|
||||
from . import signals, tasks # pylint: disable=unused-variable
|
||||
|
||||
@@ -108,7 +108,7 @@ Glossary
|
||||
An Overview of edX's Dynamic Pacing System
|
||||
------------------------------------------
|
||||
|
||||
.. image:: img/system_diagram.png
|
||||
.. image:: images/system_diagram.png
|
||||
|
||||
|
||||
Running the Management Commands
|
||||
|
||||
|
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 76 KiB |
@@ -1,9 +1,19 @@
|
||||
|
||||
from django.apps import AppConfig
|
||||
from openedx.core.djangolib.django_plugins import ProjectType, PluginURLs
|
||||
|
||||
|
||||
plugin_urls_config = {PluginURLs.NAMESPACE: u'theming', PluginURLs.REGEX: u'theming/'}
|
||||
|
||||
|
||||
class ThemingConfig(AppConfig):
|
||||
name = 'openedx.core.djangoapps.theming'
|
||||
plugin_app = {
|
||||
PluginURLs.CONFIG: {
|
||||
ProjectType.CMS: plugin_urls_config,
|
||||
ProjectType.LMS: plugin_urls_config,
|
||||
}
|
||||
}
|
||||
verbose_name = "Theming"
|
||||
|
||||
def ready(self):
|
||||
|
||||
Reference in New Issue
Block a user