Created
February 7, 2013 21:24
-
-
Save lambdamusic/4734282 to your computer and use it in GitHub Desktop.
Django: Adding custom django package to WSGI settings
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
# in your project.wsgi file | |
import os, sys | |
#add the desired django version at the beginning of the path; mind you must provide the Django folder as downloaded! | |
sys.path.insert(1, "/path/to/Django/") | |
sys.path.append('/my/project/root/') # add things as usual... | |
# the rest is the normal wsgi stuff... | |
os.environ['DJANGO_SETTINGS_MODULE'] = 'project.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