Code

Ticket #2732: django-fastcgi-docfix.diff

File django-fastcgi-docfix.diff, 1.3 KB (added by James Crasta <jcrasta@…>, 8 years ago)

FastCGI documentation fix

Line 
1Index: django/core/servers/fastcgi.py
2===================================================================
3--- django/core/servers/fastcgi.py      (revision 3758)
4+++ django/core/servers/fastcgi.py      (working copy)
5@@ -74,8 +74,9 @@
6         print message
7     return False
8 
9-def runfastcgi(argset):
10+def runfastcgi(argset, **kwargs):
11     options = FASTCGI_OPTIONS.copy()
12+    options.update(kwargs)
13     for x in argset:
14         if "=" in x:
15             k, v = x.split('=', 1)
16Index: docs/fastcgi.txt
17===================================================================
18--- docs/fastcgi.txt    (revision 3758)
19+++ docs/fastcgi.txt    (working copy)
20@@ -270,7 +270,7 @@
21     AddHandler fastcgi-script .fcgi
22     RewriteEngine On
23     RewriteCond %{REQUEST_FILENAME} !-f
24-    RewriteRule ^/(.*)$ /mysite.fcgi/$1 [QSA,L]
25+    RewriteRule ^(.*)$ mysite.fcgi/$1 [QSA,L]
26 
27 Then, create a small script that tells Apache how to spawn your FastCGI
28 program. Create a file ``mysite.fcgi`` and place it in your Web directory, and
29@@ -289,7 +289,7 @@
30     os.environ['DJANGO_SETTINGS_MODULE'] = "myproject.settings"
31 
32     from django.core.servers.fastcgi import runfastcgi
33-    runfastcgi(["method=threaded", "daemonize=false"])
34+    runfastcgi(method="threaded", daemonize="false")
35 
36 Restarting the spawned server
37 -----------------------------