From 3329c15d7a84a91a61bf040aa93cf8d432ba454c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20St=C4=99pniowski?= Date: Tue, 9 Sep 2008 14:31:46 +0200 Subject: [PATCH] Added wolnelektury.wsgi to repository. Modified project module dirs in settings.py and setpythonpath.sh. --- setpythonpath.sh | 2 +- wolnelektury.wsgi | 16 ++++++++++++++++ wolnelektury/settings.py | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 wolnelektury.wsgi 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/' -- 2.20.1