Add a fastcgi helper. Fixes #19.

This commit is contained in:
Jannis Leidel 2013-03-27 16:56:47 +01:00
parent caffc43b37
commit 87f2b4723d
2 changed files with 30 additions and 0 deletions

View file

@ -0,0 +1,5 @@
from . import importer
importer.install()
from django.core.servers.fastcgi import runfastcgi # noqa

View file

@ -161,6 +161,31 @@ probably just add the following to the **begin** of your settings module::
That has the same effect as using the ``manage.py`` or ``wsgi.py`` utilities That has the same effect as using the ``manage.py`` or ``wsgi.py`` utilities
mentioned above. mentioned above.
FastCGI
^^^^^^^
In case you use FastCGI for deploying Django (you really shouldn't) and aren't
allowed to us Django's runfcgi_ management command (that would automatically
handle the setup for your if you've followed the quickstart guide above), make
sure to use something like the following script::
#!/usr/bin/env python
import os
import sys
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mysite.settings')
os.environ.setdefault('DJANGO_CONFIGURATION', 'MySiteSettings')
from configurations.fastcgi import runfastcgi
runfastcgi(method='threaded', daemonize='true')
As you can see django-configurations provides a helper module
``configurations.fastcgi`` that handles the setup of your configurations.
.. _runfcgi: https://docs.djangoproject.com/en/1.5/howto/deployment/fastcgi/
Bugs and feature requests Bugs and feature requests
------------------------- -------------------------