# Django class based views form type

**URL:** <https://forum.djangoproject.com/t/django-class-based-views-form-type/2667>\
**Category:** Using Django\
**Created:** [May 27, 2020, 11:15pm UTC](https://forum.djangoproject.com/t/django-class-based-views-form-type/2667 "2020-05-27T23:15:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![eqmunir](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/eqmunir/32/1073_2.png) [@eqmunir](https://forum.djangoproject.com/u/eqmunir)\
**Post date:** [May 27, 2020, 11:15pm UTC](https://forum.djangoproject.com/t/django-class-based-views-form-type/2667/1 "2020-05-27T23:15:24Z")

</div>

Hello. When using django’s generic class based views (Create and Update View), does the form have to be of type `ModelForm`?

Or can it be another form like `forms.Form`. If so, then how would it work? What methods would I have to create, and what things would be different from using a `ModelForm`? Thanks.

---

<div class="post-metadata">

**Author:** ![adamchainz](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/adamchainz/32/26_2.png) [@adamchainz](https://forum.djangoproject.com/u/adamchainz)\
**Post date:** [May 28, 2020, 11:26am UTC](https://forum.djangoproject.com/t/django-class-based-views-form-type/2667/2 "2020-05-28T11:26:24Z")

</div>

You can see this in the inheritance chain for the view: [https://docs.djangoproject.com/en/3.0/ref/class-based-views/generic-editing/#django.views.generic.edit.CreateView](https://docs.djangoproject.com/en/3.0/ref/class-based-views/generic-editing/#django.views.generic.edit.CreateView)

It inherits from `ModelFormMixin`, so it’s intended to work with model forms only.

That said, I think you can probably _duck type_ and use anyøa form with a `.save()` method, though I haven’t tested that.

If you check the extensions to `Form` that `ModelForm`, and read the source code to `ModelFormMixin`, you’ll be able to answer this better for yourself.
