Opened 14 years ago

Closed 13 years ago

Last modified 13 years ago

#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

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)

ModelFormMixin-15764.patch (530 bytes ) - added by andrewebdev 13 years ago.
15764-alternate.patch (468 bytes ) - added by andrewebdev 13 years ago.
Documentation Patch

Download all attachments as: .zip

Change History (10)

comment:1 by linovia, 14 years ago

Component: Generic viewsDocumentation

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.

comment:2 by Luke Plant, 14 years ago

Easy pickings: set
Triage Stage: UnreviewedAccepted

by andrewebdev, 13 years ago

Attachment: ModelFormMixin-15764.patch added

comment:3 by andrewebdev, 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 Dougal Matthews, 13 years ago

Cc: dougal85@… added

comment:5 by andrewebdev, 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.

by andrewebdev, 13 years ago

Attachment: 15764-alternate.patch added

Documentation Patch

comment:6 by Tomek Paczkowski, 13 years ago

Triage Stage: AcceptedReady for checkin
UI/UX: unset

Patch looks OK.

comment:7 by Tim Graham, 13 years ago

Resolution: fixed
Status: newclosed

In [16380]:

Fixed #15764 - Corrected mixin docs for DeleteView; thanks linovia for the report.

comment:8 by Tim Graham, 13 years ago

In [16381]:

Fixed #15764 - Corrected mixin docs for DeleteView?; thanks linovia for the report.

Note: See TracTickets for help on using tickets.
Back to Top