#29107: ModelForm is not a subclass of Form
-------------------------------------+-------------------------------------
Reporter: Haydar | Owner: nobody
Al-Rikabi |
Type: Bug | Status: new
Component: | Version: 2.0
Documentation | Keywords: ModelForm, Form,
Severity: Normal | subclass
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
In the [https://docs.djangoproject.com/en/2.0/topics/forms/#more-about-
django-form-classes Django docs], I've read the following statement:
**All form classes are created as subclasses of django.forms.Form,
including the ModelForm, which you encounter in Django’s admin.**
\\
I believe that the above statement is wrong because as the Django project
on Github does not show that ModelForm is a subclass of django.forms.Form.
\\
in /django/forms/models.py the class ModelForm is subclass of
BaseModelForm which is also a subclass of BaseForm (located in
/django/forms/forms.py).
in /django/forms/forms.py the class Form is a subclass of BaseForm.
\\
So, as you can see, both django.forms.Form and django.forms.ModelForm are
subclasses of BaseForm, but ModelForm is not a subclass of Form as the
docs state.
--
Ticket URL: <https://code.djangoproject.com/ticket/29107>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/057.97195cc48c0e066fb15ec9834d96f564%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.