Created
May 10, 2012 13:40
-
-
Save coordt/2653053 to your computer and use it in GitHub Desktop.
A WSGI file for an application with an example project for testing on a server
This file contains hidden or 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
""" | |
Default template for WSGI definition. Assumes virtualenv is in the same | |
directory as this file, and is called virtualenv | |
""" | |
import os, sys, site | |
PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__))) | |
site.addsitedir('virtualenv/lib/python2.6/site-packages') | |
sys.path.insert(0, PROJECT_ROOT) | |
sys.stdout = sys.stderr | |
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' | |
import django.core.handlers.wsgi | |
application = django.core.handlers.wsgi.WSGIHandler() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment