mirror of
https://github.com/django/django.git
synced 2025-07-04 01:39:20 +00:00
newforms-admin: Fixed #7617 -- Adjusted the call to ModelFormMetaclass.__new__ in modelform_factory to work with the new signature introduced in [7847].
git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@7854 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
8c8513281e
commit
21974955c4
@ -290,8 +290,8 @@ def modelform_factory(model, form=ModelForm, fields=None, exclude=None,
|
||||
setattr(Meta, 'fields', fields)
|
||||
setattr(Meta, 'exclude', exclude)
|
||||
class_name = model.__name__ + 'Form'
|
||||
return ModelFormMetaclass(class_name, (form,), {'Meta': Meta},
|
||||
formfield_callback=formfield_callback)
|
||||
return ModelFormMetaclass(class_name, (form,), {'Meta': Meta,
|
||||
'formfield_callback': formfield_callback})
|
||||
|
||||
|
||||
# ModelFormSets ##############################################################
|
||||
|
Loading…
x
Reference in New Issue
Block a user