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 os
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
import datetime
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.template import Template, Context, TemplateDoesNotExist
|
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(),
|
'settings': get_safe_settings(),
|
||||||
'sys_executable': sys.executable,
|
'sys_executable': sys.executable,
|
||||||
'sys_version_info': '%d.%d.%d' % sys.version_info[0:3],
|
'sys_version_info': '%d.%d.%d' % sys.version_info[0:3],
|
||||||
|
'server_time': datetime.datetime.now(),
|
||||||
'django_version_info': get_version(),
|
'django_version_info': get_version(),
|
||||||
'sys_path' : sys.path,
|
'sys_path' : sys.path,
|
||||||
'template_info': template_info,
|
'template_info': template_info,
|
||||||
|
@ -389,6 +391,10 @@ TECHNICAL_500_TEMPLATE = """
|
||||||
<th>Python Path:</th>
|
<th>Python Path:</th>
|
||||||
<td>{{ sys_path }}</td>
|
<td>{{ sys_path }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Server time:</th>
|
||||||
|
<td>{{server_time|date:"r"}}</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% if unicode_hint %}
|
{% if unicode_hint %}
|
||||||
|
|
Loading…
Reference in New Issue