From: Marek Stępniowski Date: Sun, 11 Oct 2009 00:04:09 +0000 (+0200) Subject: Przeniesienie wolnelektury.fcgi i wolnelektury.wsgi do katalogu głównego. X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/fb1b8f7e6c3aee1ba755affdf27472a7c995050d Przeniesienie wolnelektury.fcgi i wolnelektury.wsgi do katalogu głównego. --- diff --git a/wolnelektury/deploy/wolnelektury.fcgi b/wolnelektury/deploy/wolnelektury.fcgi deleted file mode 100644 index 1f9c621c1..000000000 --- a/wolnelektury/deploy/wolnelektury.fcgi +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env python -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.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 deleted file mode 100644 index 590d36bcd..000000000 --- a/wolnelektury/deploy/wolnelektury.wsgi +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env python -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.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/wolnelektury.fcgi b/wolnelektury/wolnelektury.fcgi new file mode 100644 index 000000000..1f9c621c1 --- /dev/null +++ b/wolnelektury/wolnelektury.fcgi @@ -0,0 +1,23 @@ +#!/usr/bin/env python +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.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/wolnelektury.wsgi b/wolnelektury/wolnelektury.wsgi new file mode 100644 index 000000000..590d36bcd --- /dev/null +++ b/wolnelektury/wolnelektury.wsgi @@ -0,0 +1,23 @@ +#!/usr/bin/env python +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.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() +