Commit 23631b83 by Jason Bau

AWS settings hook for addl installed apps + lms/wsgi_apache.py

wsgi_apache.py passes an apache env variable for SERVICE_VARIANT
to the os environment, where it's normally set when we use gunicorn
parent b82eedbe
......@@ -138,6 +138,10 @@ MKTG_URL_LINK_MAP.update(ENV_TOKENS.get('MKTG_URL_LINK_MAP', {}))
#Timezone overrides
TIME_ZONE = ENV_TOKENS.get('TIME_ZONE', TIME_ZONE)
#Additional installed apps
for app in ENV_TOKENS.get('ADDL_INSTALLED_APPS', []):
INSTALLED_APPS += (app,)
for feature, value in ENV_TOKENS.get('MITX_FEATURES', {}).items():
MITX_FEATURES[feature] = value
......
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "lms.envs.aws")
# This application object is used by the development server
# as well as any WSGI server configured to use this file.
from django.core.wsgi import WSGIHandler
_application = WSGIHandler()
def application(environ, start_response):
#copy SERVICE_VARIANT from apache environ to os environ
os.environ.setdefault("SERVICE_VARIANT", environ.get("SERVICE_VARIANT", "lms"))
return _application(environ, start_response)
from django.conf import settings
from xmodule.modulestore.django import modulestore
for store_name in settings.MODULESTORE:
modulestore(store_name)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment