Created
January 16, 2013 18:23
-
-
Save hersonls/4549435 to your computer and use it in GitHub Desktop.
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
import os | |
import sys | |
INTERP = os.path.join(os.environ['HOME'], '.virtualenvs', 'project', 'bin', 'python') | |
if sys.executable != INTERP: | |
os.execl(INTERP, INTERP, *sys.argv) | |
sys.path.insert(1, os.getcwd()) # '[...]./' | |
sys.path.insert(1, os.path.join(os.getcwd(), 'project')) # '[...]/project/' | |
import django.core.handlers.wsgi | |
os.environ['DJANGO_SETTINGS_MODULE'] = 'project.settings' | |
application = django.core.handlers.wsgi.WSGIHandler() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment