Fixed #29107 -- Doc'd that ModelForm doesn't actually inherit from Form.

This commit is contained in:
Tim Graham 2018-02-08 10:10:28 -05:00 committed by GitHub
parent d61fe24601
commit ff61a25081
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -370,9 +370,11 @@ ready to learn a bit more about the underlying machinery.
More about Django :class:`Form` classes
=======================================
All form classes are created as subclasses of :class:`django.forms.Form`,
including the :doc:`ModelForm </topics/forms/modelforms>`, which you encounter
in Django's admin.
All form classes are created as subclasses of either :class:`django.forms.Form`
or :class:`django.forms.ModelForm`. You can think of ``ModelForm`` as a
subclass of ``Form``. ``Form`` and ``ModelForm`` actually inherit common
functionality from a (private) ``BaseForm`` class, but this implementation
detail is rarely important.
.. admonition:: Models and Forms