mirror of
https://github.com/django/django.git
synced 2024-12-01 15:42:04 +01:00
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
This commit is contained in:
parent
f8578d7f19
commit
c01e6b852a
@ -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 %}
|
||||
|
Loading…
Reference in New Issue
Block a user