Localized Date/DateTime fields proposal
|Reported by:||janr||Owned by:||garcia_marc|
|Cc:||Triage Stage:||Fixed on a branch|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
This is an attempt at providing Date/DateTime fields for locales other than
English. The patch provides a DateField, DateTimeField and
DateTimeInput widget that accept Dutch input.
It should be relatively easy to add additional locales (at least, that was the setup) .
>>> from django.contrib.localflavor.nl.forms import DateField >>> f = DateField() >>> f.clean('25 augustus 2003') datetime.date(2003, 8, 25) >>> from django.contrib.localflavor.nl.widgets import DateTimeInput >>> d = DateTimeInput(date_output_format='%d %B %Y') >>> d.render('foo', datetime.now()) u'<input type="text" name="foo" value="17 september 2007" />'
Change History (9)
Changed 9 years ago by janr
comment:1 Changed 9 years ago by Simon G. <dev@…>
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Design decision needed
comment:6 Changed 7 years ago by garcia_marc
- Keywords i18n-fixed added; i18n-rf removed
- Owner changed from nobody to garcia_marc
comment:7 Changed 7 years ago by garcia_marc
- Triage Stage changed from Design decision needed to Fixed on a branch