Django

Code

Ticket #8210 (closed: fixed)

Opened 4 months ago

Last modified 3 months ago

USStateField should be moved to django.contrib.localflavor.us

Reported by: Piotr Lewandowski <django@icomputing.pl> Assigned to: jacob
Milestone: 1.0 Component: Database layer (models, ORM)
Version: SVN Keywords:
Cc: ubanus@users.sf.net Triage Stage: Accepted
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

8210-1.diff (6.0 kB) - added by mattmcc on 08/28/08 19:40:43.
8210-2.diff (8.2 kB) - added by mattmcc on 08/31/08 18:53:21.

Change History

08/12/08 05:49:43 changed by julianb

  • needs_better_patch changed.
  • stage changed from Unreviewed to Accepted.
  • needs_tests changed.
  • needs_docs changed.

08/26/08 12:56:36 changed by Jakub Wilk <ubanus@users.sf.net>

  • cc set to ubanus@users.sf.net.

08/28/08 07:38:22 changed by russellm

  • stage changed from Accepted to Design decision needed.
  • milestone set to 1.0.

(follow-up: ↓ 8 ) 08/28/08 08:31:16 changed by russellm

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)

08/28/08 16:06:35 changed by jacob

  • component changed from Core framework to Database wrapper.
  • stage changed from Design decision needed to Accepted.

08/28/08 17:08:02 changed by mattmcc

  • owner changed from nobody to mattmcc.
  • status changed from new to assigned.

08/28/08 19:40:43 changed by mattmcc

  • attachment 8210-1.diff added.

(follow-up: ↓ 9 ) 08/28/08 19:42:00 changed by mattmcc

  • owner changed from mattmcc to nobody.
  • status changed from assigned to new.
  • has_patch set to 1.

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.

(in reply to: ↑ 4 ) 08/28/08 20:18:42 changed by Piotr Lewandowski <django@icomputing.pl>

Replying to russellm:

It's probably also worth looking at PhoneNumberField? (either moving to USPhoneNumberField in localflavor, or reassessing the default widget)

Thanks for the good remark - I've opened #8664 for this case.

(in reply to: ↑ 7 ) 08/31/08 15:52:38 changed by jacob

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.

08/31/08 18:53:21 changed by mattmcc

  • attachment 8210-2.diff added.

09/01/08 17:03:12 changed by jacob

  • owner changed from nobody to jacob.
  • status changed from new to assigned.

09/01/08 17:16:31 changed by jacob

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

Fixed in [8819].


Add/Change #8210 (USStateField should be moved to django.contrib.localflavor.us)




Change Properties
Action