Files
edx-platform/lms/wsgi_apache_lms.py
Jeremy Bowman 00adba695c Stop logging deprecation warnings outside devstack (#23742)
The upgrade to Django 2.2 has caused a spike in production logging due to RemovedInDjango30Warning deprecation warnings. For now, turn off logging of DeprecationWarning, ImportWarning, and PendingDeprecationWarning whenever we're using WSGI (they'll continue to be logged in devstack). We may eventually want this behind an easily flipped toggle, but for now just remove it to get this resolved quickly.
2020-04-16 13:54:07 -04:00

24 lines
669 B
Python

"""
Apache WSGI file for LMS
This module contains the WSGI application used for Apache deployment.
It exposes a module-level variable named ``application``.
"""
# Patch the xml libs before anything else.
from safe_lxml import defuse_xml_libs
defuse_xml_libs()
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "lms.envs.aws")
os.environ.setdefault("SERVICE_VARIANT", "lms")
import lms.startup as startup
startup.run()
# 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() # pylint: disable=invalid-name