From: Marek Stępniowski Date: Tue, 9 Sep 2008 12:31:46 +0000 (+0200) Subject: Added wolnelektury.wsgi to repository. X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/3329c15d7a84a91a61bf040aa93cf8d432ba454c?ds=sidebyside Added wolnelektury.wsgi to repository. Modified project module dirs in settings.py and setpythonpath.sh. --- diff --git a/setpythonpath.sh b/setpythonpath.sh index 2aea8d84b..0b4b18471 100755 --- a/setpythonpath.sh +++ b/setpythonpath.sh @@ -1,2 +1,2 @@ #!/bin/sh -export PYTHONPATH=`pwd`/lib:`pwd`/apps:$PYTHONPATH \ No newline at end of file +export PYTHONPATH=`pwd`/lib:`pwd`/apps:`pwd`/wolnelektury:$PYTHONPATH \ No newline at end of file diff --git a/wolnelektury.wsgi b/wolnelektury.wsgi new file mode 100644 index 000000000..adeb8aa33 --- /dev/null +++ b/wolnelektury.wsgi @@ -0,0 +1,16 @@ +import sys +import os +from os import path + +# Add project directories to PYTHONPATH +PROJECT_DIR = path.abspath(path.dirname(__file__)) +PROJECT_MODULE_DIRS = [PROJECT_DIR + '/lib', PROJECT_DIR + '/apps', PROJECT_DIR + '/wolnelektury'] + +sys.path = PROJECT_MODULE_DIRS + sys.path + + +# Run Django +from django.core.handlers.wsgi import WSGIHandler + +os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' +application = WSGIHandler() diff --git a/wolnelektury/settings.py b/wolnelektury/settings.py index 04b5fd568..c5b8d6797 100644 --- a/wolnelektury/settings.py +++ b/wolnelektury/settings.py @@ -80,7 +80,7 @@ MIDDLEWARE_CLASSES = [ if DEBUG: MIDDLEWARE_CLASSES.append('middleware.ProfileMiddleware') -ROOT_URLCONF = 'wolnelektury.urls' +ROOT_URLCONF = 'urls' TEMPLATE_DIRS = ( PROJECT_DIR + '/templates/'