wsgi.py 581 B

1234567891011121314151617181920
  1. """
  2. WSGI config for pycs_backend project.
  3. It exposes the WSGI callable as a module-level variable named ``application``.
  4. For more information on this file, see
  5. https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/
  6. """
  7. import os
  8. import socketio
  9. from django.contrib.staticfiles.handlers import StaticFilesHandler
  10. from django.core.wsgi import get_wsgi_application
  11. from pycs_socketio import sio
  12. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'pycs_backend.settings')
  13. django_app = StaticFilesHandler(get_wsgi_application())
  14. application = socketio.WSGIApp(sio, django_app)