@register.filter(name='dateformat')
def do_dateformat(value, use_format='c'):
 try:
  use_format = get_format(use_format)
 except AttributeError:
  pass
 return dateformat.format(value, use_format)

@ register . filter ( name = 'dateformat' ) def do_dateformat ( value , use_format = 'c' ) : try : use_format = get_format ( use_format ) except AttributeError : pass return dateformat . format ( value , use_format )
formats a value date using format .