Created
June 28, 2013 15:15
-
-
Save JuniorLima/5885440 to your computer and use it in GitHub Desktop.
WSGI Kinghost
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
import os | |
import sys | |
import site | |
# Calculates the path based on location of WSGI script. | |
apache_configuration = os.path.realpath(os.path.dirname(__file__)) | |
project = os.path.join(apache_configuration, 'nomedoproto') | |
sys.path.append(apache_configuration) | |
sys.path.append(project) | |
site.addsitedir('/home/nomedoprojeto/apps_wsgi/.site-packages') | |
os.environ['PYTHON_EGG_CACHE'] = '/home/nomedoprojeto/apps_wsgi/.python-eggs' | |
os.environ['DJANGO_SETTINGS_MODULE'] = 'nomedoprojeto.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