﻿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
26456	Document formfield_callback attribute in ModelForm	Vlastimil Zíma	nobody	"When creating a form from model, the most effective way for modification of several fields at once is `formfield_callback`. While it is documented argument of `modelform_factory` which is used for dynamically created forms, the attribute `formfield_callback` on statically defined `ModelForm` remains undocumented. There is growing evidence, that despite it isn't documented it is generally used or required, see #17924, http://stackoverflow.com/questions/660929/how-do-you-change-the-default-widget-for-all-django-date-fields-in-a-modelform, http://stackoverflow.com/questions/7342925/django-problem-inheriting-formfield-callback-in-modelforms

I don't require any change of functionality, I just want the following two methods to create a model form to be equal:
{{{
#!python
# This works, but it's hard to read on a module level.
MyModelForm = modelform_factory(MyModel, formfield_callback=my_callback)

# This does the same thing, but it's not documented.
class MyModelForm(forms.ModelForm):
    formfield_callback = my_callback

    class Meta:
        model = MyModel
}}}"	New feature	closed	Documentation	dev	Normal	wontfix			Unreviewed	0	0	0	0	0	0
