#11251 closed New feature (fixed)
Australian Local Flavo(u)r models would be nice
| Reported by: | Owned by: | Simon Meers | |
|---|---|---|---|
| Component: | contrib.localflavor | Version: | dev |
| 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: | no | UI/UX: | no |
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)
Change History (19)
by , 16 years ago
| Attachment: | au-models.diff added |
|---|
comment:1 by , 16 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
comment:2 by , 16 years ago
| Resolution: | fixed |
|---|---|
| Status: | closed → reopened |
comment:3 by , 16 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:4 by , 16 years ago
| milestone: | → 1.2 |
|---|---|
| Needs tests: | set |
| Version: | 1.0 → 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 by , 16 years ago
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 by , 16 years ago
| Patch needs improvement: | set |
|---|
comment:7 by , 16 years ago
| milestone: | 1.2 |
|---|---|
| Version: | SVN |
comment:8 by , 16 years ago
| Needs tests: | unset |
|---|---|
| Owner: | changed from to |
| Patch needs improvement: | unset |
| Status: | reopened → new |
| Version: | → 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.
comment:9 by , 15 years ago
Would we be better off closing this and leaving such things out of Django core/contrib? DDN I guess...
comment:11 by , 15 years ago
| Severity: | → Normal |
|---|---|
| Type: | → New feature |
by , 15 years ago
| Attachment: | 11251.au-models.py added |
|---|
Updated patch for new localflavor tests structure
comment:12 by , 15 years ago
| Triage Stage: | Accepted → 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 by , 15 years ago
Cool, thanks Julien.
Wow, that was a dusty old patch... though I guess there are a lot of dustier ones on older tickets!
Patch which provides django.contrib.localflavor.au.models and associated documentation.