Skip to content

Commit

Permalink
Add a fastcgi helper. Fixes jazzband#19.
Browse files Browse the repository at this point in the history
  • Loading branch information
jezdez committed Mar 27, 2013
1 parent caffc43 commit 87f2b47
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
5 changes: 5 additions & 0 deletions configurations/fastcgi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from . import importer

importer.install()

from django.core.servers.fastcgi import runfastcgi # noqa
25 changes: 25 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
-------------------------

Expand Down

0 comments on commit 87f2b47

Please sign in to comment.