#9979: localizing input_formats on DateField
---------------------+------------------------------------------------------
Reporter: matehat | Owner: matehat
Status: new | Milestone:
Component: Forms | Version: 1.0
Keywords: | Stage: Unreviewed
Has_patch: 1 |
---------------------+------------------------------------------------------
I needed a DateField to be able to receive lazy ugettext objects and
resolve them at validating time, but when I tried I got an error from the
internal python date parser, so I just applied `force_unicode` on each
passed format in the field's clean method and everything works fine. I
attached the patch so you can check it out and merge it ASAP!
Currently, my modifications allows the input_formats parameter to be in
the form of:
input_formats = ( _l('some_format'), _('some_other_format') ) # where _l
is `ugettext_lazy`
--
Ticket URL: <http://code.djangoproject.com/ticket/9979>
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
-~----------~----~----~----~------~----~------~--~---