Ticket #4335: sys-info-debug-500-error.patch
File sys-info-debug-500-error.patch, 1.3 KB (added by , 17 years ago) |
---|
-
django/views/debug.py
2 2 from django.template import Template, Context, TemplateDoesNotExist 3 3 from django.utils.html import escape 4 4 from django.http import HttpResponseServerError, HttpResponseNotFound 5 import os, re 5 import os, re, sys 6 6 7 7 HIDDEN_SETTINGS = re.compile('SECRET|PASSWORD|PROFANITIES_LIST') 8 8 … … 131 131 'request': request, 132 132 'request_protocol': request.is_secure() and "https" or "http", 133 133 'settings': get_safe_settings(), 134 'sys_executable' : sys.executable, 135 'sys_version_info' : '%d.%d.%d' % sys.version_info[0:3], 134 136 'template_info': template_info, 135 137 'template_does_not_exist': template_does_not_exist, 136 138 'loader_debug_info': loader_debug_info, … … 334 336 <th>Exception Location:</th> 335 337 <td>{{ lastframe.filename|escape }} in {{ lastframe.function|escape }}, line {{ lastframe.lineno }}</td> 336 338 </tr> 339 <tr> 340 <th>Python Executable:</th> 341 <td>{{ sys_executable|escape }}</td> 342 </tr> 343 <tr> 344 <th>Python Version:</th> 345 <td>{{ sys_version_info }}</td> 346 </tr> 337 347 </table> 338 348 </div> 339 349 {% if template_does_not_exist %}