Django

Code

Ticket #4542 (closed: fixed)

Opened 1 year ago

Last modified 1 year ago

generic localflavor date field

Reported by: nick.lane.au@gmail.com Assigned to: nobody
Milestone: Component: django.contrib.localflavor
Version: SVN Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

au_dates.diff (2.6 kB) - added by nick.lane.au@gmail.com on 06/11/07 23:55:26.
Australian date fields
generic-localflavor.diff (8.1 kB) - added by nick.lane.au@gmail.com on 06/13/07 21:55:01.
Generic localflavor with date fields
4542.diff (7.4 kB) - added by nick.lane.au@gmail.com on 07/09/07 07:32:46.
Patch against r5625

Change History

06/11/07 23:55:26 changed by nick.lane.au@gmail.com

  • attachment au_dates.diff added.

Australian date fields

06/11/07 23:59:57 changed by nick.lane.au@gmail.com

  • needs_better_patch changed.
  • component changed from Uncategorized to django.contrib.localflavor.
  • needs_tests changed.
  • owner changed from jacob to adrian.
  • needs_docs changed.
  • has_patch set to 1.

06/12/07 15:47:37 changed by SmileyChris

  • 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?

06/12/07 20:31:21 changed by mtredinnick

  • 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.

06/12/07 20:31:28 changed by mtredinnick

  • needs_better_patch set to 1.
  • needs_tests set to 1.

06/13/07 21:55:01 changed by nick.lane.au@gmail.com

  • attachment generic-localflavor.diff added.

Generic localflavor with date fields

06/13/07 21:59:54 changed by nick.lane.au@gmail.com

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

07/09/07 07:32:46 changed by nick.lane.au@gmail.com

  • attachment 4542.diff added.

Patch against r5625

07/19/07 07:57:30 changed by Simon G. <dev@simon.net.nz>

  • needs_better_patch deleted.
  • summary changed from AU localflavor date field to generic localflavor date field.
  • needs_tests deleted.
  • stage changed from Accepted to Ready for checkin.

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

09/14/07 14:28:27 changed by jacob

  • status changed from new to closed.
  • resolution set to fixed.

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


Add/Change #4542 (generic localflavor date field)




Change Properties
Action