Ticket #6486: views_debug__server_time.diff

File views_debug__server_time.diff, 934 bytes (added by Thomas Güttler, 17 years ago)

better patch: use RFC 2822 date format (incl. time zone offset)

  • django/views/debug.py

     
    11import os
    22import re
    33import sys
     4import datetime
    45
    56from django.conf import settings
    67from django.template import Template, Context, TemplateDoesNotExist
     
    158159        'settings': get_safe_settings(),
    159160        'sys_executable': sys.executable,
    160161        'sys_version_info': '%d.%d.%d' % sys.version_info[0:3],
     162        'server_time': datetime.datetime.now(),
    161163        'django_version_info': get_version(),
    162164        'sys_path' : sys.path,
    163165        'template_info': template_info,
     
    386388      <td>{{ sys_version_info }}</td>
    387389    </tr>
    388390    <tr>
     391      <th>Server time:</th>
     392      <td>{{server_time|date:"r"}}</td>
     393    </tr>
     394    <tr>
    389395      <th>Python Path:</th>
    390396      <td>{{ sys_path }}</td>
    391397    </tr>
Back to Top