Skip to content

Instantly share code, notes, and snippets.

@sweldon
Last active March 13, 2020 20:38
Show Gist options
  • Save sweldon/e8cac7679dbf64bbb024c7d17fbd21fc to your computer and use it in GitHub Desktop.
Save sweldon/e8cac7679dbf64bbb024c7d17fbd21fc to your computer and use it in GitHub Desktop.
Django WSGI Example
"""
WSGI config for a django project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
"""
import os
import sys
from django.core.wsgi import get_wsgi_application
sys.path.append('/home/ubuntu/your-repo')
sys.path.append('/home/ubuntu/your-repo/project')
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings")
application = get_wsgi_application()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment