mirror of
https://github.com/django/django.git
synced 2025-05-29 18:26:29 +00:00
[2.0.x] Fixed #29107 -- Doc'd that ModelForm doesn't actually inherit from Form.
Backport of ff61a250815d32ff185501a5afef0245fec7d878 from master
This commit is contained in:
parent
8d03356d35
commit
29dd7dcdfd
@ -370,9 +370,11 @@ ready to learn a bit more about the underlying machinery.
|
|||||||
More about Django :class:`Form` classes
|
More about Django :class:`Form` classes
|
||||||
=======================================
|
=======================================
|
||||||
|
|
||||||
All form classes are created as subclasses of :class:`django.forms.Form`,
|
All form classes are created as subclasses of either :class:`django.forms.Form`
|
||||||
including the :doc:`ModelForm </topics/forms/modelforms>`, which you encounter
|
or :class:`django.forms.ModelForm`. You can think of ``ModelForm`` as a
|
||||||
in Django's admin.
|
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
|
.. admonition:: Models and Forms
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user