Ticket #4084: models_usstatefield.2.patch
File models_usstatefield.2.patch, 764 bytes (added by , 18 years ago) |
---|
-
__init__.py
old new 866 866 class USStateField(Field): 867 867 def get_manipulator_field_objs(self): 868 868 return [oldforms.USStateField] 869 870 def formfield(self, **kwargs): 871 import django.contrib.localflavor.usa.forms as USForms 872 defaults = {'required': not self.blank, 'label': capfirst(self.verbose_name), 'help_text': self.help_text} 873 defaults.update(kwargs) 874 defaults['widget'] = USForms.USStateSelect() 875 return USForms.USStateField(**defaults) 869 876 870 877 class XMLField(TextField): 871 878 def __init__(self, verbose_name=None, name=None, schema_path=None, **kwargs):