django.core.exceptions.ImproperlyConfigured: Using ModelFormMixin (base
class of MyModelCreateView) without the 'fields' attribute is prohibited.
It seems like fields should not have to be specified on a CreateView or
UpdateView when a form is specified since fields HAVE to be specified on a
form. Why can't the view just use the fields specified on the form?
Raising this error when no fields have been specified on the view but a
form HAS been specified seems to go against DRY.
--
Ticket URL: <https://code.djangoproject.com/ticket/33074>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* resolution: => invalid
Comment:
Thanks for the report, however specifying both `fields` and `form_class`
is not permitted and `fields` are not checked when `form_class` is
specified, see
[https://github.com/django/django/blob/3219dd3388c437b4bd869b76ddd43c9cdad05090/django/views/generic/edit.py#L76-L99
get_form_class()]. I'm not sure how you could reach this path with
`form_class` 🤔
--
Ticket URL: <https://code.djangoproject.com/ticket/33074#comment:1>