wsgi.py 767 Bytes
Newer Older
1 2 3 4
# Patch the xml libs
from safe_lxml import defuse_xml_libs
defuse_xml_libs()

5 6 7 8
# Disable PyContract contract checking when running as a webserver
import contracts
contracts.disable_all()

9 10 11 12
import os

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "lms.envs.aws")

13 14 15
import lms.startup as startup
startup.run()

16 17 18 19 20
from django.conf import settings
from xmodule.modulestore.django import modulestore

# Trigger a forced initialization of our modulestores since this can take a
# while to complete and we want this done before HTTP requests are accepted.
21
modulestore()
22 23


24 25 26 27
# 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()