Ticket #14082: modelform_factory_custom_metaclasses.diff
File modelform_factory_custom_metaclasses.diff, 690 bytes (added by , 14 years ago) |
---|
-
django/forms/models.py
404 404 'formfield_callback': formfield_callback 405 405 } 406 406 407 return ModelFormMetaclass(class_name, (form,), form_class_attrs)407 form_metaclass = ModelFormMetaclass 408 408 409 if issubclass(form, BaseModelForm) and hasattr(form, '__metaclass__'): 410 form_metaclass = form.__metaclass__ 409 411 412 return form_metaclass(class_name, (form,), form_class_attrs) 413 414 410 415 # ModelFormSets ############################################################## 411 416 412 417 class BaseModelFormSet(BaseFormSet):