Opened 9 years ago

Closed 9 years ago

#4542 closed (fixed)

generic localflavor date field

Reported by:… Owned by: nobody
Component: contrib.localflavor Version: master
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


I've added a patch to add an AUDateField and AUDateTimeField to the Australian localflavor contrib. They're just extensions of regular DateField and DateTimeField's that use Australian "dd/mm/yy" (etc) date formats by default.

Another possibility would be to just define AU_DATE_INPUT_FORMATS and AU_DATETIME_INPUT_FORMATS tuples and then pass them in to regular DateField's as the input_format argument.

Attachments (3)

au_dates.diff (2.6 KB) - added by… 9 years ago.
Australian date fields
generic-localflavor.diff (8.1 KB) - added by… 9 years ago.
Generic localflavor with date fields
4542.diff (7.4 KB) - added by… 9 years ago.
Patch against r5625

Download all attachments as: .zip

Change History (10)

Changed 9 years ago by…

Australian date fields

comment:1 Changed 9 years ago by…

  • Component changed from Uncategorized to django.contrib.localflavor
  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Owner changed from jacob to adrian
  • Patch needs improvement unset

comment:2 Changed 9 years ago by SmileyChris

  • Triage Stage changed from Unreviewed to Design decision needed

I'll move to design decision until the way to handle this is agreed on. Perhaps you could take it to the developer's group?

comment:3 Changed 9 years ago by mtredinnick

  • Triage Stage changed from Design decision needed to Accepted

We should probably give these better names, since they aren't specific to Australia. The North American format is by far the minority case.

The settings aren't a good idea, because it will conflict with far too many places where there are existing date format strings and we'll be fielding actual and perceived bug reports until the cows come home. Plus, again, they aren't .au specific.

We might make a "generic" directory (or similar name) under localflavor/ for this sort of thing. Then the classes can just be called DateField and DateTimeField (because the import location namespaces them sufficiently).

Patch is missing tests, too.

comment:4 Changed 9 years ago by mtredinnick

  • Needs tests set
  • Patch needs improvement set

Changed 9 years ago by…

Generic localflavor with date fields

comment:5 Changed 9 years ago by…

Last patch is against 0.96 (before localflavor tests were added) because I can't access svn.

Changed 9 years ago by…

Patch against r5625

comment:6 Changed 9 years ago by Simon G. <dev@…>

  • Needs tests unset
  • Patch needs improvement unset
  • Summary changed from AU localflavor date field to generic localflavor date field
  • Triage Stage changed from Accepted to Ready for checkin

4542 looks good, and appears to answer all MT's quibbles above.

comment:7 Changed 9 years ago by jacob

  • Resolution set to fixed
  • Status changed from new to closed

(In [6208]) Fixed #4542: added a generic localflavor DateField. Thanks, Nick Lane.

Note: See TracTickets for help on using tickets.
Back to Top