mirror of
https://github.com/django/django.git
synced 2024-12-22 09:05:43 +00:00
Fixed #4084 -- Added formfield() support to the USStateField model field.
Thanks, polpak@yahoo.com. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5130 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
94cb93edca
commit
157ade371b
1
AUTHORS
1
AUTHORS
@ -181,6 +181,7 @@ answer newbie questions, and generally made Django that much better:
|
||||
Luke Plant <http://lukeplant.me.uk/>
|
||||
plisk
|
||||
Daniel Poelzleithner <http://poelzi.org/>
|
||||
polpak@yahoo.com
|
||||
J. Rademaker
|
||||
Michael Radziej <mir@noris.de>
|
||||
ramiro
|
||||
|
@ -869,6 +869,12 @@ class USStateField(Field):
|
||||
def get_manipulator_field_objs(self):
|
||||
return [oldforms.USStateField]
|
||||
|
||||
def formfield(self, **kwargs):
|
||||
from django.contrib.localflavor.us.forms import USStateSelect
|
||||
defaults = {'widget': USStateSelect}
|
||||
defaults.update(kwargs)
|
||||
return super(USStateField, self).formfield(**defaults)
|
||||
|
||||
class XMLField(TextField):
|
||||
def __init__(self, verbose_name=None, name=None, schema_path=None, **kwargs):
|
||||
self.schema_path = schema_path
|
||||
|
Loading…
Reference in New Issue
Block a user