Skip to content

Instantly share code, notes, and snippets.

@craigpalermo
Last active August 29, 2015 14:03
Show Gist options
  • Save craigpalermo/3a619d70934baf17a6df to your computer and use it in GitHub Desktop.
Save craigpalermo/3a619d70934baf17a6df to your computer and use it in GitHub Desktop.
wsgi.py for django project
import os, sys
path = '/path/to/project'
settings_module = 'myapp.settings'
if path not in sys.path:
sys.path.append(path)
os.environ.setdefault("DJANGO_SETTINGS_MODULE", settings_module)
# 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.
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
# Apply WSGI middleware here.
# from helloworld.wsgi import HelloWorldApplication
# application = HelloWorldApplication(application)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment