#9520: date filter should not crash when dealing with non date objects
-----------------------------------------+----------------------------------
 Reporter:  hotani                       |       Owner:  nobody    
   Status:  new                          |   Milestone:            
Component:  Template system              |     Version:  SVN       
 Keywords:  date format filter template  |       Stage:  Unreviewed
Has_patch:  0                            |  
-----------------------------------------+----------------------------------
 I'm using date filter on a form field like so: {{
 form.field.data|date:"m-d-Y" }} When loading the form for editing, all is
 well. However, if validation fails for the form, date fields are sent back
 as unicode and not date objects. The date filter throws an error.

 As a workaround, I wrote a wrapper for the date filter which puts it in a
 try/except block, returning the value if 'date' fails. This works but
 feels hacky.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/9520>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to