Opened 6 years ago

Closed 4 years ago

Last modified 4 years ago

#11251 closed New feature (fixed)

Australian Local Flavo(u)r models would be nice

Reported by: Simon Meers <DrMeers@…> Owned by: DrMeers
Component: contrib.localflavor Version: master
Severity: Normal Keywords: Australia
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

US localflavor provides models as well as forms; it appears to be the only one. I have created a patch which provides Australian models (and documentation).

Attachments (4)

au-models.diff (2.6 KB) - added by Simon Meers <DrMeers@…> 6 years ago.
Patch which provides django.contrib.localflavor.au.models and associated documentation.
au-models.2.diff (8.5 KB) - added by DrMeers 5 years ago.
models, forms, tests and documentation
11251.au-models.py (8.2 KB) - added by julien 4 years ago.
Updated patch for new localflavor tests structure
11251.au-models.diff (8.2 KB) - added by julien 4 years ago.
Oops, this time in diff format

Download all attachments as: .zip

Change History (19)

Changed 6 years ago by Simon Meers <DrMeers@…>

Patch which provides django.contrib.localflavor.au.models and associated documentation.

comment:1 Changed 6 years ago by DrMeers

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to fixed
  • Status changed from new to closed

comment:2 Changed 6 years ago by DrMeers

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:3 Changed 6 years ago by Alex

  • Triage Stage changed from Unreviewed to Accepted

comment:4 Changed 6 years ago by jezdez

  • milestone set to 1.2
  • Needs tests set
  • Version changed from 1.0 to SVN

This will need some tests to get checked in. You can follow the example of the US model fields which are tested in source:django/trunk/tests/regressiontests/localflavor

comment:5 Changed 6 years ago by Alex

This needs to be updated post multi-db. Best solution is to do something like: http://code.djangoproject.com/changeset/11857 and remove the explicit DB column type.

comment:6 Changed 6 years ago by Alex

  • Patch needs improvement set

comment:7 Changed 6 years ago by russellm

  • milestone 1.2 deleted
  • Version SVN deleted

comment:8 Changed 5 years ago by DrMeers

  • Needs tests unset
  • Owner changed from nobody to DrMeers
  • Patch needs improvement unset
  • Status changed from reopened to new
  • Version set to SVN

OK, I've updated the models for multi-db, added regression tests and made a few other improvements.

I suggest the USLocalflavorTests adopt a similar regex approach rather than explicitly testing output which is more subject to irrelevant changes. I wasn't sure whether to take the liberty of doing so myself, especially in an unrelated ticket.

Changed 5 years ago by DrMeers

models, forms, tests and documentation

comment:9 Changed 5 years ago by DrMeers

Would we be better off closing this and leaving such things out of Django core/contrib? DDN I guess...

comment:10 Changed 5 years ago by jezdez

  • milestone set to 1.3

No, that's fine, the patch looks good.

comment:11 Changed 4 years ago by julien

  • Severity set to Normal
  • Type set to New feature

Changed 4 years ago by julien

Updated patch for new localflavor tests structure

Changed 4 years ago by julien

Oops, this time in diff format

comment:12 Changed 4 years ago by julien

  • Triage Stage changed from Accepted to Ready for checkin

The patch looks great. I've just updated it so it uses the new localflavor tests structure introduced in [13505].

comment:13 Changed 4 years ago by DrMeers

Cool, thanks Julien.

Wow, that was a dusty old patch... though I guess there are a lot of dustier ones on older tickets!

comment:14 Changed 4 years ago by jezdez

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

In [16066]:

Fixed #11251 -- Extended Australian localflavor to ship a few model fields additionally. Thanks, Simon Meers and Julien Phalip.

comment:15 Changed 4 years ago by jacob

  • milestone 1.3 deleted

Milestone 1.3 deleted

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