Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #2732 -- Fixed error in FastCGI docs and added keyword-arg supp…

…ort in a FastCGI function. Thanks for the patch, James Crasta

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3759 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 927ec3fe7b446079d169ce684f833800bc117b74 1 parent 45399b4
Adrian Holovaty authored
3  django/core/servers/fastcgi.py
@@ -74,8 +74,9 @@ def fastcgi_help(message=None):
74 74
         print message
75 75
     return False
76 76
 
77  
-def runfastcgi(argset):
  77
+def runfastcgi(argset, **kwargs):
78 78
     options = FASTCGI_OPTIONS.copy()
  79
+    options.update(kwargs)
79 80
     for x in argset:
80 81
         if "=" in x:
81 82
             k, v = x.split('=', 1)
4  docs/fastcgi.txt
@@ -270,7 +270,7 @@ In your Web root directory, add this to a file named ``.htaccess`` ::
270 270
     AddHandler fastcgi-script .fcgi
271 271
     RewriteEngine On
272 272
     RewriteCond %{REQUEST_FILENAME} !-f
273  
-    RewriteRule ^/(.*)$ /mysite.fcgi/$1 [QSA,L]
  273
+    RewriteRule ^(.*)$ mysite.fcgi/$1 [QSA,L]
274 274
 
275 275
 Then, create a small script that tells Apache how to spawn your FastCGI
276 276
 program. Create a file ``mysite.fcgi`` and place it in your Web directory, and
@@ -289,7 +289,7 @@ be sure to make it executable ::
289 289
     os.environ['DJANGO_SETTINGS_MODULE'] = "myproject.settings"
290 290
 
291 291
     from django.core.servers.fastcgi import runfastcgi
292  
-    runfastcgi(["method=threaded", "daemonize=false"])
  292
+    runfastcgi(method="threaded", daemonize="false")
293 293
 
294 294
 Restarting the spawned server
295 295
 -----------------------------

0 notes on commit 927ec3f

Please sign in to comment.
Something went wrong with that request. Please try again.