#8210 closed Uncategorized (fixed)
USStateField should be moved to django.contrib.localflavor.us
| Reported by: | Owned by: | Jacob | |
|---|---|---|---|
| Component: | Database layer (models, ORM) | Version: | dev | 
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | yes | Needs documentation: | no | 
| Needs tests: | no | Patch needs improvement: | no | 
| Easy pickings: | no | UI/UX: | no | 
Description
USStateField is currently in django.db.models.fields. Pre-1.0 stage is the last chance to move it to a proper place, i.e. to django.contrib.localflavor.us.
Attachments (2)
Change History (15)
comment:1 by , 17 years ago
| Triage Stage: | Unreviewed → Accepted | 
|---|
comment:2 by , 17 years ago
| Cc: | added | 
|---|
comment:3 by , 17 years ago
| milestone: | → 1.0 | 
|---|---|
| Triage Stage: | Accepted → Design decision needed | 
follow-up: 8 comment:4 by , 17 years ago
comment:5 by , 17 years ago
| Component: | Core framework → Database wrapper | 
|---|---|
| Triage Stage: | Design decision needed → Accepted | 
comment:6 by , 17 years ago
| Owner: | changed from to | 
|---|---|
| Status: | new → assigned | 
by , 17 years ago
| Attachment: | 8210-1.diff added | 
|---|
follow-up: 9 comment:7 by , 17 years ago
| Has patch: | set | 
|---|---|
| Owner: | changed from to | 
| Status: | assigned → new | 
Some decisions I didn't make:
- The Person model in docs/topics/db/models.txt uses a models.USStateField. Leaving it in the example without an import line may cause confusion, but it feels wrong to have the import in a code fragment of that sort.
 - db.backends.*.creation defines a [var]char field for USStateField. Should this now be handled by the field itself via db_type, and the entry removed from the creation modules?
 - gis.utils.layermapping maps a USStateField, but may not care about it after the field is no longer in the default django.db.models.fields collection.
 
comment:8 by , 17 years ago
comment:9 by , 17 years ago
Replying to mattmcc:
Some decisions I didn't make:
- The Person model in docs/topics/db/models.txt uses a models.USStateField. Leaving it in the example without an import line may cause confusion, but it feels wrong to have the import in a code fragment of that sort.
 
Please add a fix for this in the patch; just throw the import at the top of the code snippet.
- db.backends.*.creation defines a [var]char field for USStateField. Should this now be handled by the field itself via db_type, and the entry removed from the creation modules?
 
Yes; please add it to the patch.
- gis.utils.layermapping maps a USStateField, but may not care about it after the field is no longer in the default django.db.models.fields collection.
 
It's fine to leave this alone; Justin can clean it up if it bugs him.
by , 17 years ago
| Attachment: | 8210-2.diff added | 
|---|
comment:10 by , 17 years ago
| Owner: | changed from to | 
|---|---|
| Status: | new → assigned | 
comment:12 by , 15 years ago
| Cc: | removed | 
|---|---|
| Easy pickings: | unset | 
| Severity: | → Normal | 
| Type: | → Uncategorized | 
  Note:
 See   TracTickets
 for help on using tickets.
    
For the record - I'm in favor of this change; It's probably also worth looking at PhoneNumberField (either moving to USPhoneNumberField in localflavor, or reassessing the default widget)