Ticket #6610: trac-6610.diff

File trac-6610.diff, 2.1 KB (added by Michael Kurze, 16 years ago)

Allow to specify a debug parameter to runfcgi that is passed to flup and allows for traceback pages. Default is False.

  • django/core/servers/fastcgi.py

     
    3535  maxspare=NUMBER      max number of spare processes / threads
    3636  minspare=NUMBER      min number of spare processes / threads.
    3737  maxchildren=NUMBER   hard limit number of processes / threads
     38  debug=BOOL           whether to enable flup traceback pages (default false).
    3839  daemonize=BOOL       whether to detach from terminal.
    3940  pidfile=FILE         write the spawned process-id to this file.
    4041  workdir=DIRECTORY    change to this directory when daemonizing.
     
    7273    'minspare': 2,
    7374    'maxchildren': 50,
    7475    'maxrequests': 0,
     76    'debug': False,
    7577    'outlog': None,
    7678    'errlog': None,
    7779    'umask': None,
     
    125127    else:
    126128        return fastcgi_help("ERROR: Implementation must be one of prefork or thread.")
    127129
    128     wsgi_opts['debug'] = False # Turn off flup tracebacks
     130    if options["debug"] == False:
     131        wsgi_opts['debug'] = False
     132    elif options["debug"].lower() in ('true', 'yes', 't'):
     133        wsgi_opts['debug'] = True
    129134
    130135    try:
    131136        WSGIServer = getattr(__import__('flup.' + flup_module, '', '', flup_module), 'WSGIServer')
  • docs/howto/deployment/fastcgi.txt

     
    114114
    115115    ./manage.py runfcgi method=prefork socket=/home/user/mysite.sock pidfile=django.pid
    116116
    117 Run without daemonizing (backgrounding) the process (good for debugging)::
     117Run without daemonizing (backgrounding) the process (good for debugging).
     118Also enable flup debug pages, this helps to track down problems with middleware::
    118119
    119     ./manage.py runfcgi daemonize=false socket=/tmp/mysite.sock maxrequests=1
     120    ./manage.py runfcgi debug=true daemonize=false socket=/tmp/mysite.sock maxrequests=1
    120121
    121122Stopping the FastCGI daemon
    122123---------------------------
Back to Top