Opened 18 years ago

Closed 18 years ago

#2455 closed enhancement (fixed)

USStateField to show list of US states in admin

Reported by: anonymous Owned by: Adrian Holovaty
Component: Forms Version:
Severity: normal Keywords:
Cc: Triage Stage: Design decision needed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

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 (2)

usstates.patch (1.9 KB ) - added by anonymous 18 years ago.
states.py (1.7 KB ) - added by tvon@… 18 years ago.
A choices-friendly list of US states

Download all attachments as: .zip

Change History (8)

by anonymous, 18 years ago

Attachment: usstates.patch added

comment:1 by anonymous, 18 years ago

Summary: USStateField to show list of US states in admin[patch] USStateField to show list of US states in admin

comment:2 by Adrian Holovaty, 18 years ago

Status: newassigned

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.

by tvon@…, 18 years ago

Attachment: states.py added

A choices-friendly list of US states

comment:3 by tvon@…, 18 years ago

Please ignore my redundant attachment.

comment:4 by Gary Wilson <gary.wilson@…>, 18 years ago

Component: Admin interfacedjango.newforms
Patch needs improvement: set
Summary: [patch] USStateField to show list of US states in adminUSStateField to show list of US states in admin
Triage Stage: UnreviewedDesign 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.

comment:5 by Adrian Holovaty, 18 years ago

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

comment:6 by Adrian Holovaty, 18 years ago

Resolution: fixed
Status: assignedclosed

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

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