Ticket #6967: choices-fix.patch
File choices-fix.patch, 601 bytes (added by , 17 years ago) |
---|
-
django/db/models/fields/__init__.py
490 490 491 491 def formfield(self, **kwargs): 492 492 defaults = {'max_length': self.max_length} 493 if self._choices: 494 defaults['form_class'] = forms.ChoiceField 495 defaults['choices'] = self._choices 496 del defaults['max_length'] 493 497 defaults.update(kwargs) 494 498 return super(CharField, self).formfield(**defaults) 495 499