Opened 18 years ago

Closed 17 years ago

#4542 closed (fixed)

generic localflavor date field

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

Description

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 nick.lane.au@… 18 years ago.
Australian date fields
generic-localflavor.diff (8.1 KB ) - added by nick.lane.au@… 18 years ago.
Generic localflavor with date fields
4542.diff (7.4 KB ) - added by nick.lane.au@… 17 years ago.
Patch against r5625

Download all attachments as: .zip

Change History (10)

by nick.lane.au@…, 18 years ago

Attachment: au_dates.diff added

Australian date fields

comment:1 by nick.lane.au@…, 18 years ago

Component: Uncategorizeddjango.contrib.localflavor
Has patch: set
Owner: changed from Jacob to Adrian Holovaty

comment:2 by Chris Beaven, 18 years ago

Triage Stage: UnreviewedDesign 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 by Malcolm Tredinnick, 18 years ago

Triage Stage: Design decision neededAccepted

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 by Malcolm Tredinnick, 18 years ago

Needs tests: set
Patch needs improvement: set

by nick.lane.au@…, 18 years ago

Attachment: generic-localflavor.diff added

Generic localflavor with date fields

comment:5 by nick.lane.au@…, 18 years ago

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

by nick.lane.au@…, 17 years ago

Attachment: 4542.diff added

Patch against r5625

comment:6 by Simon G. <dev@…>, 17 years ago

Needs tests: unset
Patch needs improvement: unset
Summary: AU localflavor date fieldgeneric localflavor date field
Triage Stage: AcceptedReady for checkin

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

comment:7 by Jacob, 17 years ago

Resolution: fixed
Status: newclosed

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

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