mirror of
https://github.com/jazzband/django-configurations.git
synced 2026-03-16 22:20:27 +00:00
Add a fastcgi helper. Fixes #19.
This commit is contained in:
parent
caffc43b37
commit
87f2b4723d
2 changed files with 30 additions and 0 deletions
5
configurations/fastcgi.py
Normal file
5
configurations/fastcgi.py
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
from . import importer
|
||||
|
||||
importer.install()
|
||||
|
||||
from django.core.servers.fastcgi import runfastcgi # noqa
|
||||
|
|
@ -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
|
||||
-------------------------
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue