X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/36f6233fd79390ad5af8a1532eac60a0ae57c825..f938afb8ab4cb091d12e0ef0311eaea14b774798:/redakcja.wsgi.template diff --git a/redakcja.wsgi.template b/redakcja.wsgi.template new file mode 100644 index 00000000..6b772f34 --- /dev/null +++ b/redakcja.wsgi.template @@ -0,0 +1,24 @@ +#!$PYTHON +import site +site.addsitedir('$PYTHON_SITE') + +import os +from os.path import abspath, dirname, join +import sys + +# Redirect sys.stdout to sys.stderr for bad libraries like geopy that use +# print statements for optional import exceptions. +sys.stdout = sys.stderr + +# Add apps and lib directories to PYTHONPATH +sys.path = [ + '$PROJECT_ROOT', + '$PROJECT_ROOT/lib', + '$PROJECT_ROOT/apps', +] + sys.path + +# Run Django +os.environ['DJANGO_SETTINGS_MODULE'] = '$PROJECT_NAME.settings' + +from django.core.handlers.wsgi import WSGIHandler +application = WSGIHandler()