Ticket #6449: django-datetime-filter.patch
File django-datetime-filter.patch, 934 bytes (added by , 17 years ago) |
---|
-
django/template/defaultfilters.py
620 620 return format(value, arg) 621 621 date.is_safe = False 622 622 623 def datetime(value, arg=None): 624 """Formats a datetime according to the given format.""" 625 from django.utils.dateformat import format 626 if not value: 627 return u'' 628 if arg is None: 629 arg = settings.DATETIME_FORMAT 630 return format(value, arg) 631 datetime.is_safe = False 632 623 633 def time(value, arg=None): 624 634 """Formats a time according to the given format.""" 625 635 from django.utils.dateformat import time_format … … 793 803 register.filter(center) 794 804 register.filter(cut) 795 805 register.filter(date) 806 register.filter(datetime) 796 807 register.filter(default) 797 808 register.filter(default_if_none) 798 809 register.filter(dictsort)