Commit c01e6b85 authored by Malcolm Tredinnick's avatar Malcolm Tredinnick
Browse files

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
parent f8578d7f
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
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 %}