﻿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
20644	ModelFormMixin.fields not present in flattened index	Baptiste Mispelon	Baptiste Mispelon	"f026a519aea8f3ea7ca339bfbbb007e1ee0068b0 introduced the new `fields` attribute on `ModelFormMixin` which allows views like `CreateView` or `UpdateView` to define which model fields should be present on the dynamically created form.

However, this new attribute was not added to the flattened index page [1].

Note that technically, the `ModelFormMixin` does not have a `fields` attribute, but rather the implementation of `ModelFormMixin.get_form_class` [2] does a `getattr(self, 'fields', None)`.
I don't see any reason for using `getattr` instead of simply declaring the `fields` attribute on the mixin itself so I think it should be changed too.

[1] https://github.com/django/django/blob/master/docs/ref/class-based-views/flattened-index.txt
[2] https://github.com/django/django/blob/master/django/views/generic/edit.py#L112"	Cleanup/optimization	closed	Generic views	dev	Normal	fixed			Ready for checkin	1	0	0	0	0	0
