From ca6e4f345e61ce613d9a394caf7c714a50e9c94e Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Sun, 10 Jun 2007 04:02:29 +0000 Subject: [PATCH] Fixed #4335 -- Added Python executable binary path and version to debug output. Thanks, Pete Crosier. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5456 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- AUTHORS | 1 + django/views/debug.py | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index 01f7983e36..cd1bb2002f 100644 --- a/AUTHORS +++ b/AUTHORS @@ -73,6 +73,7 @@ answer newbie questions, and generally made Django that much better: Michal Chruszcz Ian Clelland crankycoder@gmail.com + Pete Crosier Matt Croydon flavio.curella@gmail.com Jure Cuhalev diff --git a/django/views/debug.py b/django/views/debug.py index 2530350e26..a534f17b33 100644 --- a/django/views/debug.py +++ b/django/views/debug.py @@ -2,7 +2,7 @@ from django.conf import settings from django.template import Template, Context, TemplateDoesNotExist from django.utils.html import escape from django.http import HttpResponseServerError, HttpResponseNotFound -import os, re +import os, re, sys HIDDEN_SETTINGS = re.compile('SECRET|PASSWORD|PROFANITIES_LIST') @@ -131,6 +131,8 @@ def technical_500_response(request, exc_type, exc_value, tb): 'request': request, 'request_protocol': request.is_secure() and "https" or "http", 'settings': get_safe_settings(), + 'sys_executable' : sys.executable, + 'sys_version_info' : '%d.%d.%d' % sys.version_info[0:3], 'template_info': template_info, 'template_does_not_exist': template_does_not_exist, 'loader_debug_info': loader_debug_info, @@ -334,6 +336,14 @@ TECHNICAL_500_TEMPLATE = """ Exception Location: {{ lastframe.filename|escape }} in {{ lastframe.function|escape }}, line {{ lastframe.lineno }} + + Python Executable: + {{ sys_executable|escape }} + + + Python Version: + {{ sys_version_info }} + {% if template_does_not_exist %}