MCPcopy
hub / github.com/django/django / get_changelist_form

Method get_changelist_form

django/contrib/admin/options.py:968–981  ·  view source on GitHub ↗

Return a Form class for use in the Formset on the changelist page.

(self, request, **kwargs)

Source from the content-addressed store, hash-verified

966 return None
967
968 def get_changelist_form(self, request, **kwargs):
969 """
970 Return a Form class for use in the Formset on the changelist page.
971 """
972 defaults = {
973 "formfield_callback": partial(self.formfield_for_dbfield, request=request),
974 **kwargs,
975 }
976 if defaults.get("fields") is None and not modelform_defines_fields(
977 defaults.get("form")
978 ):
979 defaults["fields"] = forms.ALL_FIELDS
980
981 return modelform_factory(self.model, **defaults)
982
983 def get_changelist_formset(self, request, **kwargs):
984 """

Calls 3

modelform_defines_fieldsFunction · 0.90
modelform_factoryFunction · 0.90
getMethod · 0.45