Created
April 10, 2014 01:58
-
-
Save fellipeh/10336699 to your computer and use it in GitHub Desktop.
Erro WSGI
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 | |
import site | |
# Add the site-packages of the chosen virtualenv to work with | |
site.addsitedir('/home/fellipeh/.virtualenvs/dig/local/lib/python2.7/site-packages') | |
# Add the app's directory to the PYTHONPATH | |
sys.path.append('/var/www/django/dig') | |
sys.path.append('/var/www/django/dig/dig') | |
# os.environ['DJANGO_SETTINGS_MODULE'] = 'dig.settings' | |
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "dig.settings") | |
# Activate your virtual env | |
activate_env=os.path.expanduser("/home/fellipeh/.virtualenvs/dig/bin/activate_this.py") | |
execfile(activate_env, dict(__file__=activate_env)) | |
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