diff --git a/examples/frameworks/django/testing/testing/wsgi.py b/examples/frameworks/django/testing/testing/wsgi.py index c9a07fd6..5be3fb9c 100644 --- a/examples/frameworks/django/testing/testing/wsgi.py +++ b/examples/frameworks/django/testing/testing/wsgi.py @@ -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