Ticket #3632: forms.2.diff
File forms.2.diff, 720 bytes (added by , 18 years ago) |
---|
-
newforms/forms.py
46 46 if hasattr(base, 'base_fields'): 47 47 fields = base.base_fields.items() + fields 48 48 49 attrs['base_fields'] = SortedDictFromList(fields) 49 # preserve initial values 50 base_fields = SortedDictFromList(fields) 51 for k, v in attrs.get('base_fields', dict()).items(): 52 if k in base_fields: 53 base_fields[k].initial = v.initial 54 attrs['base_fields'] = base_fields 50 55 return type.__new__(cls, name, bases, attrs) 51 56 52 57 class BaseForm(StrAndUnicode):