Merge pull request #18010 from edx/jlajoie/LEARNER-4700
LEARNER-4700: Converts credentials to plugin
This commit is contained in:
25
openedx/core/djangoapps/credentials/apps.py
Normal file
25
openedx/core/djangoapps/credentials/apps.py
Normal file
@@ -0,0 +1,25 @@
|
||||
"""
|
||||
Credentials Configuration
|
||||
"""
|
||||
from django.apps import AppConfig
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from openedx.core.djangoapps.plugins.constants import ProjectType, SettingsType, PluginSettings
|
||||
|
||||
|
||||
class CredentialsConfig(AppConfig):
|
||||
"""
|
||||
Configuration class for credentials Django app
|
||||
"""
|
||||
name = 'openedx.core.djangoapps.credentials'
|
||||
verbose_name = _("Credentials")
|
||||
|
||||
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.devstack'},
|
||||
SettingsType.TEST: {PluginSettings.RELATIVE_PATH: u'settings.test'},
|
||||
}
|
||||
}
|
||||
}
|
||||
11
openedx/core/djangoapps/credentials/settings/aws.py
Normal file
11
openedx/core/djangoapps/credentials/settings/aws.py
Normal file
@@ -0,0 +1,11 @@
|
||||
"""Production settings for Credentials"""
|
||||
|
||||
|
||||
def plugin_settings(settings):
|
||||
# Credentials Settings
|
||||
settings.CREDENTIALS_INTERNAL_SERVICE_URL = settings.ENV_TOKENS.get(
|
||||
'CREDENTIALS_INTERNAL_SERVICE_URL', settings.CREDENTIALS_INTERNAL_SERVICE_URL
|
||||
)
|
||||
settings.CREDENTIALS_PUBLIC_SERVICE_URL = settings.ENV_TOKENS.get(
|
||||
'CREDENTIALS_PUBLIC_SERVICE_URL', settings.CREDENTIALS_PUBLIC_SERVICE_URL
|
||||
)
|
||||
7
openedx/core/djangoapps/credentials/settings/common.py
Normal file
7
openedx/core/djangoapps/credentials/settings/common.py
Normal file
@@ -0,0 +1,7 @@
|
||||
"""Common settings for Credentials."""
|
||||
|
||||
|
||||
def plugin_settings(settings):
|
||||
# Credentials Settings
|
||||
settings.CREDENTIALS_INTERNAL_SERVICE_URL = 'http://localhost:8008'
|
||||
settings.CREDENTIALS_PUBLIC_SERVICE_URL = 'http://localhost:8008'
|
||||
7
openedx/core/djangoapps/credentials/settings/devstack.py
Normal file
7
openedx/core/djangoapps/credentials/settings/devstack.py
Normal file
@@ -0,0 +1,7 @@
|
||||
"""Docker devstack settings for Credentials."""
|
||||
|
||||
|
||||
def plugin_settings(settings):
|
||||
# Credentials Settings
|
||||
settings.CREDENTIALS_INTERNAL_SERVICE_URL = 'http://edx.devstack.credentials:18150'
|
||||
settings.CREDENTIALS_PUBLIC_SERVICE_URL = 'http://localhost:18150'
|
||||
7
openedx/core/djangoapps/credentials/settings/test.py
Normal file
7
openedx/core/djangoapps/credentials/settings/test.py
Normal file
@@ -0,0 +1,7 @@
|
||||
"""Test settings for Credentials."""
|
||||
|
||||
|
||||
def plugin_settings(settings):
|
||||
# Credentials Settings
|
||||
settings.CREDENTIALS_INTERNAL_SERVICE_URL = 'https://credentials-internal.example.com'
|
||||
settings.CREDENTIALS_PUBLIC_SERVICE_URL = 'https://credentials.example.com'
|
||||
Reference in New Issue
Block a user