Last active
March 13, 2020 20:38
-
-
Save sweldon/e8cac7679dbf64bbb024c7d17fbd21fc to your computer and use it in GitHub Desktop.
Django WSGI Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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