1
0
mirror of https://github.com/django/django.git synced 2025-07-03 17:29:12 +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:
Brian Rosner 2008-07-06 15:28:05 +00:00
parent 8c8513281e
commit 21974955c4

View File

@ -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 ##############################################################