Opened 4 years ago

Closed 4 years ago

Last modified 4 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 4 years ago.
15764-alternate.patch (468 bytes) - added by andrewebdev 4 years ago.
Documentation Patch

Download all attachments as: .zip

Change History (10)

comment:1 Changed 4 years ago by linovia

  • Component changed from Generic views to Documentation
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

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 Changed 4 years ago by lukeplant

  • Easy pickings set
  • Triage Stage changed from Unreviewed to Accepted

Changed 4 years ago by andrewebdev

comment:3 Changed 4 years ago by andrewebdev

  • Has patch set
  • Needs tests set

Patch uploaded. Not sure if this needs testing or how it would be tested.

comment:4 Changed 4 years ago by d0ugal

  • Cc dougal85@… added

comment:5 Changed 4 years ago by andrewebdev

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.

Changed 4 years ago by andrewebdev

Documentation Patch

comment:6 Changed 4 years ago by oinopion

  • Triage Stage changed from Accepted to Ready for checkin
  • UI/UX unset

Patch looks OK.

comment:7 Changed 4 years ago by timo

  • Resolution set to fixed
  • Status changed from new to closed

In [16380]:

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

comment:8 Changed 4 years ago by timo

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