From 5c17366cd54fe9ef0552d78e4ace94bc0f01d82a Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Tue, 28 Aug 2012 12:01:05 -0400 Subject: [PATCH] Add a wsgi file for the lms that loads the modulestores immediately after the application starts --- lms/wsgi.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 lms/wsgi.py diff --git a/lms/wsgi.py b/lms/wsgi.py new file mode 100644 index 0000000000..270b019add --- /dev/null +++ b/lms/wsgi.py @@ -0,0 +1,14 @@ +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 get_wsgi_application +application = get_wsgi_application() + +from django.conf import settings +from xmodule.modulestore.django import modulestore + +for store_name in settings.MODULESTORE: + modulestore(store_name)