From: Marek Stępniowski Date: Wed, 1 Oct 2008 11:18:43 +0000 (+0200) Subject: Moved wolnelektury.fcgi and wolnelektury.wsgi to deploy subdirectory of project folder. X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/81301c1c50d2dd24bc8f2b132e5947d95bf0ea9c?ds=sidebyside;hp=-c Moved wolnelektury.fcgi and wolnelektury.wsgi to deploy subdirectory of project folder. --- 81301c1c50d2dd24bc8f2b132e5947d95bf0ea9c diff --git a/wolnelektury.fcgi b/wolnelektury.fcgi deleted file mode 100644 index fd41ab24d..000000000 --- a/wolnelektury.fcgi +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env python -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.insert(0, abspath(join(dirname(__file__), '../apps'))) -sys.path.insert(0, abspath(join(dirname(__file__), '../lib'))) - -# Emulate manage.py path hacking. -sys.path.insert(0, abspath(join(dirname(__file__), "../../"))) -sys.path.insert(0, abspath(join(dirname(__file__), "../"))) - -# Run Django -os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' - -from django.core.servers.fastcgi import runfastcgi -runfastcgi(method='threaded', daemonize='false') - diff --git a/wolnelektury.wsgi b/wolnelektury.wsgi deleted file mode 100644 index 27327133b..000000000 --- a/wolnelektury.wsgi +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env python -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.insert(0, abspath(join(dirname(__file__), '../apps'))) -sys.path.insert(0, abspath(join(dirname(__file__), '../lib'))) - -# Emulate manage.py path hacking. -sys.path.insert(0, abspath(join(dirname(__file__), "../../"))) -sys.path.insert(0, abspath(join(dirname(__file__), "../"))) - -# Run Django -os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' - -from django.core.handlers.wsgi import WSGIHandler -application = WSGIHandler() - diff --git a/wolnelektury/deploy/wolnelektury.fcgi b/wolnelektury/deploy/wolnelektury.fcgi new file mode 100644 index 000000000..ba9fbef3f --- /dev/null +++ b/wolnelektury/deploy/wolnelektury.fcgi @@ -0,0 +1,22 @@ +#!/usr/bin/env python +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.insert(0, abspath(join(dirname(__file__), '../../apps'))) +sys.path.insert(0, abspath(join(dirname(__file__), '../../lib'))) + +# Emulate manage.py path hacking. +sys.path.insert(0, abspath(join(dirname(__file__), "../../"))) +sys.path.insert(0, abspath(join(dirname(__file__), "../"))) + +# Run Django +os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' + +from django.core.servers.fastcgi import runfastcgi +runfastcgi(method='threaded', daemonize='false') + diff --git a/wolnelektury/deploy/wolnelektury.wsgi b/wolnelektury/deploy/wolnelektury.wsgi new file mode 100644 index 000000000..4fead214d --- /dev/null +++ b/wolnelektury/deploy/wolnelektury.wsgi @@ -0,0 +1,22 @@ +#!/usr/bin/env python +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.insert(0, abspath(join(dirname(__file__), '../../apps'))) +sys.path.insert(0, abspath(join(dirname(__file__), '../../lib'))) + +# Emulate manage.py path hacking. +sys.path.insert(0, abspath(join(dirname(__file__), "../../"))) +sys.path.insert(0, abspath(join(dirname(__file__), "../"))) + +# Run Django +os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' + +from django.core.handlers.wsgi import WSGIHandler +application = WSGIHandler() +