Added wolnelektury.fcgi to repository.
authorMarek Stępniowski <marek@stepniowski.com>
Wed, 17 Sep 2008 14:52:33 +0000 (16:52 +0200)
committerMarek Stępniowski <marek@stepniowski.com>
Wed, 17 Sep 2008 14:52:33 +0000 (16:52 +0200)
wolnelektury.fcgi [new file with mode: 0644]

diff --git a/wolnelektury.fcgi b/wolnelektury.fcgi
new file mode 100644 (file)
index 0000000..badca95
--- /dev/null
@@ -0,0 +1,17 @@
+#!/usr/bin/python
+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
+
+# Set the DJANGO_SETTINGS_MODULE environment variable.
+os.environ['DJANGO_SETTINGS_MODULE'] = 'settings_eo'
+
+from django.core.servers.fastcgi import runfastcgi
+runfastcgi(method='threaded', daemonize='false')
+