diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-03-20 07:01:26 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-03-20 07:01:26 +0000 |
| commit | c01e6b852ab652e9ba3f7d3ac43cd5d20802a215 (patch) | |
| tree | 9b895f52fe86d6310639071dd1caf13ac567e21a | |
| parent | f8578d7f19efc5d1b0e5961fa6e6a7868b27132a (diff) | |
Fixed #6486 -- Added local server time to the debug output page. Patch from
Bastian Kleineidam and Thomas Güttler.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7333 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/views/debug.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/django/views/debug.py b/django/views/debug.py index ea16f6972a..a118ac3126 100644 --- a/django/views/debug.py +++ b/django/views/debug.py @@ -1,6 +1,7 @@ import os import re import sys +import datetime from django.conf import settings from django.template import Template, Context, TemplateDoesNotExist @@ -158,6 +159,7 @@ def get_traceback_html(request, exc_type, exc_value, tb): 'settings': get_safe_settings(), 'sys_executable': sys.executable, 'sys_version_info': '%d.%d.%d' % sys.version_info[0:3], + 'server_time': datetime.datetime.now(), 'django_version_info': get_version(), 'sys_path' : sys.path, 'template_info': template_info, @@ -389,6 +391,10 @@ TECHNICAL_500_TEMPLATE = """ <th>Python Path:</th> <td>{{ sys_path }}</td> </tr> + <tr> + <th>Server time:</th> + <td>{{server_time|date:"r"}}</td> + </tr> </table> </div> {% if unicode_hint %} |
