NDOJ/dmoj/wsgi.py

17 lines
356 B
Python
Raw Permalink Normal View History

2020-01-21 06:35:58 +00:00
import os
2022-05-14 17:57:27 +00:00
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "dmoj.settings")
2020-01-21 06:35:58 +00:00
try:
import MySQLdb # noqa: F401, imported for side effect
except ImportError:
import pymysql
pymysql.install_as_MySQLdb()
2022-05-14 17:57:27 +00:00
from django.core.wsgi import (
get_wsgi_application,
) # noqa: E402, django must be imported here
2020-01-21 06:35:58 +00:00
application = get_wsgi_application()