Django

Code

Ticket #2455 (closed: fixed)

Opened 2 years ago

Last modified 2 years ago

USStateField to show list of US states in admin

Reported by: anonymous Assigned to: adrian
Milestone: Component: Forms
Version: Keywords:
Cc: Triage Stage: Design decision needed
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 1

Description

Here's a patch to db/models/fields/__init__.py that allows displaying a select box containing all US states in admin.

- Mikko Nylén

Attachments

usstates.patch (1.9 kB) - added by anonymous on 07/30/06 09:43:48.
states.py (1.7 kB) - added by tvon@baltimoresquirrels.com on 08/08/06 16:12:57.
A choices-friendly list of US states

Change History

07/30/06 09:43:48 changed by anonymous

  • attachment usstates.patch added.

07/30/06 09:44:11 changed by anonymous

  • summary changed from USStateField to show list of US states in admin to [patch] USStateField to show list of US states in admin.

07/31/06 23:10:41 changed by adrian

  • status changed from new to assigned.

Thanks for this patch. It's probably a bit out of place for Django's database layer to include an entire list of American states and territories, though, so this is a good excuse to move USStateField into django.contrib.usa or something like that.

08/08/06 16:12:57 changed by tvon@baltimoresquirrels.com

  • attachment states.py added.

A choices-friendly list of US states

08/08/06 16:14:29 changed by tvon@baltimoresquirrels.com

Please ignore my redundant attachment.

01/22/07 21:40:51 changed by Gary Wilson <gary.wilson@gmail.com>

  • needs_better_patch set to 1.
  • summary changed from [patch] USStateField to show list of US states in admin to USStateField to show list of US states in admin.
  • component changed from Admin interface to django.newforms.
  • stage changed from Unreviewed to Design decision needed.

Maybe needs discussion on where this should go. Adrian has made a suggestion. There are some other fields that would also fit into that category, like #1466.

02/15/07 00:18:28 changed by adrian

(In [4525]) Implented newforms USStateField in django.contrib.localflavor.usa. Refs #2455

02/19/07 18:30:22 changed by adrian

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

(In [4545]) Fixed #2455 -- Added newforms USStateSelect widget in django.contrib.localflavor.usa


Add/Change #2455 (USStateField to show list of US states in admin)




Change Properties
Action