mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-12-12 14:17:46 +00:00
Simplify common openedx settings management
Use "{% include %}" jinja directive instead of python "exec", which was a bit weird. Also, this sets the technical email for the studio, which was previous set at "technical@example.com".
This commit is contained in:
parent
5675af4d42
commit
e539f31504
@ -1,9 +1,7 @@
|
|||||||
import os
|
import os
|
||||||
from cms.envs.devstack import *
|
from cms.envs.devstack import *
|
||||||
|
|
||||||
|
{% include "apps/openedx/settings/partials/common/lms.py" %}
|
||||||
# Execute the contents of common.py in this context
|
|
||||||
execfile(os.path.join(os.path.dirname(__file__), "common.py"), globals())
|
|
||||||
|
|
||||||
# Setup correct webpack configuration file for development
|
# Setup correct webpack configuration file for development
|
||||||
WEBPACK_CONFIG_PATH = "webpack.dev.config.js"
|
WEBPACK_CONFIG_PATH = "webpack.dev.config.js"
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
import os
|
import os
|
||||||
from cms.envs.production import *
|
from cms.envs.production import *
|
||||||
|
|
||||||
|
{% include "apps/openedx/settings/partials/common/cms.py" %}
|
||||||
# Execute the contents of common.py in this context
|
|
||||||
execfile(os.path.join(os.path.dirname(__file__), "common.py"), globals())
|
|
||||||
|
|
||||||
ALLOWED_HOSTS = [
|
ALLOWED_HOSTS = [
|
||||||
ENV_TOKENS.get("CMS_BASE"),
|
ENV_TOKENS.get("CMS_BASE"),
|
||||||
@ -12,7 +10,3 @@ ALLOWED_HOSTS = [
|
|||||||
"localhost",
|
"localhost",
|
||||||
"studio.localhost",
|
"studio.localhost",
|
||||||
]
|
]
|
||||||
|
|
||||||
DEFAULT_FROM_EMAIL = ENV_TOKENS["CONTACT_EMAIL"]
|
|
||||||
DEFAULT_FEEDBACK_EMAIL = ENV_TOKENS["CONTACT_EMAIL"]
|
|
||||||
SERVER_EMAIL = ENV_TOKENS["CONTACT_EMAIL"]
|
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
import os
|
import os
|
||||||
from lms.envs.devstack import *
|
from lms.envs.devstack import *
|
||||||
|
|
||||||
|
{% include "apps/openedx/settings/partials/common/cms.py" %}
|
||||||
# Execute the contents of common.py in this context
|
|
||||||
execfile(os.path.join(os.path.dirname(__file__), "common.py"), globals())
|
|
||||||
|
|
||||||
|
|
||||||
# Setup correct webpack configuration file for development
|
# Setup correct webpack configuration file for development
|
||||||
WEBPACK_CONFIG_PATH = "webpack.dev.config.js"
|
WEBPACK_CONFIG_PATH = "webpack.dev.config.js"
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
import os
|
import os
|
||||||
from lms.envs.production import *
|
from lms.envs.production import *
|
||||||
|
|
||||||
|
{% include "apps/openedx/settings/partials/common/lms.py" %}
|
||||||
# Execute the contents of common.py in this context
|
|
||||||
execfile(os.path.join(os.path.dirname(__file__), "common.py"), globals())
|
|
||||||
|
|
||||||
ALLOWED_HOSTS = [
|
ALLOWED_HOSTS = [
|
||||||
ENV_TOKENS.get("LMS_BASE"),
|
ENV_TOKENS.get("LMS_BASE"),
|
||||||
@ -19,16 +17,3 @@ SEARCH_SKIP_ENROLLMENT_START_DATE_FILTERING = True
|
|||||||
|
|
||||||
# Allow insecure oauth2 for local interaction with local containers
|
# Allow insecure oauth2 for local interaction with local containers
|
||||||
OAUTH_ENFORCE_SECURE = False
|
OAUTH_ENFORCE_SECURE = False
|
||||||
|
|
||||||
DEFAULT_FROM_EMAIL = ENV_TOKENS["CONTACT_EMAIL"]
|
|
||||||
DEFAULT_FEEDBACK_EMAIL = ENV_TOKENS["CONTACT_EMAIL"]
|
|
||||||
SERVER_EMAIL = ENV_TOKENS["CONTACT_EMAIL"]
|
|
||||||
TECH_SUPPORT_EMAIL = ENV_TOKENS["CONTACT_EMAIL"]
|
|
||||||
CONTACT_EMAIL = ENV_TOKENS["CONTACT_EMAIL"]
|
|
||||||
BUGS_EMAIL = ENV_TOKENS["CONTACT_EMAIL"]
|
|
||||||
UNIVERSITY_EMAIL = ENV_TOKENS["CONTACT_EMAIL"]
|
|
||||||
PRESS_EMAIL = ENV_TOKENS["CONTACT_EMAIL"]
|
|
||||||
PAYMENT_SUPPORT_EMAIL = ENV_TOKENS["CONTACT_EMAIL"]
|
|
||||||
BULK_EMAIL_DEFAULT_FROM_EMAIL = "no-reply@" + ENV_TOKENS["LMS_BASE"]
|
|
||||||
API_ACCESS_MANAGER_EMAIL = ENV_TOKENS["CONTACT_EMAIL"]
|
|
||||||
API_ACCESS_FROM_EMAIL = ENV_TOKENS["CONTACT_EMAIL"]
|
|
||||||
|
12
tutor/templates/apps/openedx/settings/partials/common/all.py
Normal file
12
tutor/templates/apps/openedx/settings/partials/common/all.py
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
DEFAULT_FROM_EMAIL = ENV_TOKENS["CONTACT_EMAIL"]
|
||||||
|
DEFAULT_FEEDBACK_EMAIL = ENV_TOKENS["CONTACT_EMAIL"]
|
||||||
|
SERVER_EMAIL = ENV_TOKENS["CONTACT_EMAIL"]
|
||||||
|
TECH_SUPPORT_EMAIL = ENV_TOKENS["CONTACT_EMAIL"]
|
||||||
|
CONTACT_EMAIL = ENV_TOKENS["CONTACT_EMAIL"]
|
||||||
|
BUGS_EMAIL = ENV_TOKENS["CONTACT_EMAIL"]
|
||||||
|
UNIVERSITY_EMAIL = ENV_TOKENS["CONTACT_EMAIL"]
|
||||||
|
PRESS_EMAIL = ENV_TOKENS["CONTACT_EMAIL"]
|
||||||
|
PAYMENT_SUPPORT_EMAIL = ENV_TOKENS["CONTACT_EMAIL"]
|
||||||
|
BULK_EMAIL_DEFAULT_FROM_EMAIL = "no-reply@" + ENV_TOKENS["LMS_BASE"]
|
||||||
|
API_ACCESS_MANAGER_EMAIL = ENV_TOKENS["CONTACT_EMAIL"]
|
||||||
|
API_ACCESS_FROM_EMAIL = ENV_TOKENS["CONTACT_EMAIL"]
|
@ -1,3 +1,7 @@
|
|||||||
|
{% include "apps/openedx/settings/partials/common/all.py" %}
|
||||||
|
|
||||||
|
######## Common CMS settings
|
||||||
|
|
||||||
# Load module store settings from config files
|
# Load module store settings from config files
|
||||||
update_module_store_settings(MODULESTORE, doc_store_settings=DOC_STORE_CONFIG)
|
update_module_store_settings(MODULESTORE, doc_store_settings=DOC_STORE_CONFIG)
|
||||||
|
|
||||||
@ -35,3 +39,5 @@ for folder in [LOG_DIR, MEDIA_ROOT, STATIC_ROOT_BASE]:
|
|||||||
|
|
||||||
{{ patch("openedx-common-settings") }}
|
{{ patch("openedx-common-settings") }}
|
||||||
{{ patch("openedx-cms-common-settings") }}
|
{{ patch("openedx-cms-common-settings") }}
|
||||||
|
|
||||||
|
######## End of common CMS settings
|
@ -1,5 +1,7 @@
|
|||||||
"""File with configurations for lms common between production and development.
|
{% include "apps/openedx/settings/partials/common/all.py" %}
|
||||||
"""
|
|
||||||
|
######## Common LMS settings
|
||||||
|
|
||||||
# Load module store settings from config files
|
# Load module store settings from config files
|
||||||
update_module_store_settings(MODULESTORE, doc_store_settings=DOC_STORE_CONFIG)
|
update_module_store_settings(MODULESTORE, doc_store_settings=DOC_STORE_CONFIG)
|
||||||
|
|
||||||
@ -60,3 +62,5 @@ for folder in [LOG_DIR, MEDIA_ROOT, STATIC_ROOT_BASE, ORA2_FILEUPLOAD_ROOT]:
|
|||||||
|
|
||||||
{{ patch("openedx-common-settings") }}
|
{{ patch("openedx-common-settings") }}
|
||||||
{{ patch("openedx-lms-common-settings") }}
|
{{ patch("openedx-lms-common-settings") }}
|
||||||
|
|
||||||
|
######## End of common LMS settings
|
Loading…
Reference in New Issue
Block a user