﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
10305	contrib/admin/options.py add_view, change_view	tangc	nobody	"add_view, change_view has the following code:

ModelForm = self.get_form(request)
...

 form = ModelForm(request.POST, request.FILES)
or
 form = ModelForm(initial=initial)
or 
 form = ModelForm(request.POST, request.FILES, instance=obj)

I would propose:

if isinstance(ModelForm, ModelFormMetaclass):
    form = ModelForm(request.POST, request.FILES)
else
    form = ModelForm

This way gives the flexibility to override the function get_form(self, request, obj=None, **kwargs), which could return a modelform_factory(self.model, **defaults) or an instance of a model form.
"		new	contrib.admin	dev			add_view, change_view, ModelForm		Unreviewed	0	0	0	0		
