wsgi_apache_lms.py 669 Bytes
Newer Older
1 2 3 4 5 6 7
"""
Apache WSGI file for LMS

This module contains the WSGI application used for Apache deployment.
It exposes a module-level variable named ``application``.
"""

8 9 10 11
# Patch the xml libs before anything else.
from safe_lxml import defuse_xml_libs
defuse_xml_libs()

12 13 14
import os

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

Jason Bau committed
17 18 19
import lms.startup as startup
startup.run()

20 21
# This application object is used by the development server
# as well as any WSGI server configured to use this file.
22
from django.core.wsgi import get_wsgi_application
23
application = get_wsgi_application()  # pylint: disable=invalid-name