From 21974955c4fb3df6ee9308d27c180df47dc3a660 Mon Sep 17 00:00:00 2001 From: Brian Rosner Date: Sun, 6 Jul 2008 15:28:05 +0000 Subject: [PATCH] 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 --- django/newforms/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django/newforms/models.py b/django/newforms/models.py index da2744e239..845ba975bb 100644 --- a/django/newforms/models.py +++ b/django/newforms/models.py @@ -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 ##############################################################