Opened 9 years ago

Closed 8 years ago

#2455 closed enhancement (fixed)

USStateField to show list of US states in admin

Reported by: anonymous Owned by: adrian
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: UI/UX:

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 9 years ago.
states.py (1.7 KB) - added by tvon@… 9 years ago.
A choices-friendly list of US states

Download all attachments as: .zip

Change History (8)

Changed 9 years ago by anonymous

comment:1 Changed 9 years ago 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

comment:2 Changed 9 years ago 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.

Changed 9 years ago by tvon@…

A choices-friendly list of US states

comment:3 Changed 9 years ago by tvon@…

Please ignore my redundant attachment.

comment:4 Changed 8 years ago by Gary Wilson <gary.wilson@…>

  • Component changed from Admin interface to django.newforms
  • Patch needs improvement set
  • Summary changed from [patch] USStateField to show list of US states in admin to USStateField to show list of US states in admin
  • Triage 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.

comment:5 Changed 8 years ago by adrian

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

comment:6 Changed 8 years ago by adrian

  • Resolution set to fixed
  • Status changed from assigned to closed

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

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