#15764 closed Bug (fixed)
DeleteView does not have ModelFormMixin in its mixins
Reported by: | linovia | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | 1.3 |
Severity: | Normal | Keywords: | |
Cc: | linovia, dougal85@… | Triage Stage: | Ready for checkin |
Has patch: | yes | Needs documentation: | no |
Needs tests: | yes | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
Documentation for DeleteView mentions that it inherits from ModelFormMixin
However, reading the code, we have:
- DeleteView
- SingleObjectTemplateResponseMixin
- TemplateResponseMixin
- BaseDeleteView
- DeletionMixin
- BaseDetailView
- SingleObjectMixin
- View
- SingleObjectTemplateResponseMixin
The point being that DeleteView doesn't pass any form as the documentation mentions.
http://docs.djangoproject.com/en/1.3/ref/class-based-views/#deleteview
Attachments (2)
Change History (10)
comment:1 by , 14 years ago
Component: | Generic views → Documentation |
---|
comment:2 by , 14 years ago
Easy pickings: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
by , 13 years ago
Attachment: | ModelFormMixin-15764.patch added |
---|
comment:3 by , 13 years ago
Has patch: | set |
---|---|
Needs tests: | set |
Patch uploaded. Not sure if this needs testing or how it would be tested.
comment:4 by , 13 years ago
Cc: | added |
---|
comment:5 by , 13 years ago
Actually d0ugal rightly pointed out that this a Documentation issue. It doesn't make sense to pass the form to a delete view.
I also noticed that the documentation mentions django.views.generic.edit.ProcessFormView
as another mixin, which also doesn't exist on the view.
Changing the component after a couple of tests to documentation.
One doesn't need to get a form for that. We only need a POST to the right url. There's no reason to have a form for that. Maybe the term form creates a confusion between Django forms and HTML forms.