Skip to content

Commit

Permalink
Fixed #4335 -- Added Python executable binary path and version to deb…
Browse files Browse the repository at this point in the history
…ug output.

Thanks, Pete Crosier.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5456 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
mtredinnick committed Jun 10, 2007
1 parent 014116f commit 47dae9e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ answer newbie questions, and generally made Django that much better:
Michal Chruszcz <troll@pld-linux.org>
Ian Clelland <clelland@gmail.com>
crankycoder@gmail.com
Pete Crosier <pete.crosier@gmail.com>
Matt Croydon <http://www.postneo.com/>
flavio.curella@gmail.com
Jure Cuhalev <gandalf@owca.info>
Expand Down
12 changes: 11 additions & 1 deletion django/views/debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
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')

Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -334,6 +336,14 @@ def _get_lines_from_file(filename, lineno, context_lines, loader=None, module_na
<th>Exception Location:</th>
<td>{{ lastframe.filename|escape }} in {{ lastframe.function|escape }}, line {{ lastframe.lineno }}</td>
</tr>
<tr>
<th>Python Executable:</th>
<td>{{ sys_executable|escape }}</td>
</tr>
<tr>
<th>Python Version:</th>
<td>{{ sys_version_info }}</td>
</tr>
</table>
</div>
{% if template_does_not_exist %}
Expand Down

0 comments on commit 47dae9e

Please sign in to comment.