fix django wsgi example

The wsgi file generated by django wasn't adding the project to
PYTHONPATH. This change fix it by detecting it based on the wsgi.py
path.
This commit is contained in:
benoitc 2012-05-15 10:24:39 +02:00
parent f4ddf0f7a7
commit 6603ec551a

View File

@ -14,7 +14,13 @@ framework.
"""
import os
import sys
# make sure the current project is in PYTHONPATH
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__),
"..")))
# set the environment settings
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "testing.settings")
# This application object is used by any WSGI server configured to use this