mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
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:
parent
f4ddf0f7a7
commit
6603ec551a
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user