Ticket #9520: datefilter_t9520_r10177.diff
File datefilter_t9520_r10177.diff, 784 bytes (added by , 16 years ago) |
---|
-
django/template/defaultfilters.py
673 673 return u'' 674 674 if arg is None: 675 675 arg = settings.DATE_FORMAT 676 return format(value, arg) 676 try: 677 return format(value, arg) 678 except AttributeError: 679 return value 677 680 date.is_safe = False 678 681 679 682 def time(value, arg=None): … … 683 686 return u'' 684 687 if arg is None: 685 688 arg = settings.TIME_FORMAT 686 return time_format(value, arg) 689 try: 690 return time_format(value, arg) 691 except AttributeError: 692 return value 687 693 time.is_safe = False 688 694 689 695 def timesince(value, arg=None):