Ticket #109: custom-datetime-1.diff
File custom-datetime-1.diff, 1.1 KB (added by , 19 years ago) |
---|
-
views/admin/main.py
7 7 from django.utils.html import strip_tags 8 8 from django.utils.httpwrappers import HttpResponse, HttpResponseRedirect 9 9 from django.utils.text import get_text_list 10 from django.conf.settings import ADMIN_MEDIA_PREFIX 10 from django.conf.settings import ADMIN_MEDIA_PREFIX, DATETIME_FORMAT 11 11 import operator 12 12 13 13 # Text to display within changelist table cells if the value is blank. … … 402 402 elif isinstance(f, meta.DateField): 403 403 if field_val: 404 404 if isinstance(f, meta.DateTimeField): 405 result_repr = dateformat.format(field_val, 'N j, Y, P')405 result_repr = dateformat.format(field_val, DATETIME_FORMAT) 406 406 else: 407 407 result_repr = dateformat.format(field_val, 'N j, Y') 408 408 else: