diff --git a/server/src/server/asgi.py b/server/src/server/asgi.py new file mode 100644 index 000000000..c3f6a4311 --- /dev/null +++ b/server/src/server/asgi.py @@ -0,0 +1,16 @@ +""" +ASGI config for server project. + +It exposes the ASGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/ +""" + +import os + +from django.core.asgi import get_asgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'server.settings') + +application = get_asgi_application() diff --git a/server/src/server/wsgi.py b/server/src/server/wsgi.py index 8d36428a6..c7760e624 100644 --- a/server/src/server/wsgi.py +++ b/server/src/server/wsgi.py @@ -1,34 +1,16 @@ """ WSGI config for server project. -This module contains the WSGI application used by Django's development server -and any production WSGI deployments. It should expose a module-level variable -named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover -this application via the ``WSGI_APPLICATION`` setting. - -Usually you will have the standard Django WSGI application here, but it also -might make sense to replace the whole Django WSGI application with a custom one -that later delegates to the Django one. For example, you could introduce WSGI -middleware here, or combine a Django application with an application of another -framework. +It exposes the WSGI callable as a module-level variable named ``application``. +For more information on this file, see +https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/ """ -from django.core.wsgi import get_wsgi_application -import six import os -if six.PY2: - import sys +from django.core.wsgi import get_wsgi_application - # noinspection PyCompatibility - reload(sys) - sys.setdefaultencoding('UTF-8') # @UndefinedVariable +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'server.settings') - -os.environ.setdefault("DJANGO_SETTINGS_MODULE", "server.settings") - -# This application object is used by any WSGI server configured to use this -# file. This includes Django's development server, if the WSGI_APPLICATION -# setting points here. application = get_wsgi_application()