Django

Code

Show
Ignore:
Timestamp:
03/18/08 09:34:48 (10 months ago)
Author:
mtredinnick
Message:

Fixed #6494 -- Factored out the HTML debug output into a method of its own for
reuse elsewhere. Thanks, Bastian Kleineidam.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/views/debug.py

    r7065 r7292  
    7171    the values returned from sys.exc_info() and friends. 
    7272    """ 
     73    html = get_traceback_html(request, exc_type, exc_value, tb) 
     74    return HttpResponseServerError(html, mimetype='text/html') 
     75 
     76def get_traceback_html(request, exc_type, exc_value, tb): 
     77    "Return HTML code for traceback." 
    7378    template_info = None 
    7479    template_does_not_exist = False 
     
    160165        'loader_debug_info': loader_debug_info, 
    161166    }) 
    162     return HttpResponseServerError(t.render(c), mimetype='text/html'
     167    return t.render(c
    163168 
    164169def technical_404_response(request, exception):