#29735: MRO of DeleteView need to be changed.
-------------------------------------+-------------------------------------
     Reporter:  seokhun kim          |                    Owner:  seokhun
         Type:                       |  kim
  Cleanup/optimization               |                   Status:  assigned
    Component:  Generic views        |                  Version:  master
     Severity:  Normal               |               Resolution:
     Keywords:  deletemixin,         |             Triage Stage:
  basedeleteview, deleteview,        |  Unreviewed
  generic view                       |
    Has patch:  1                    |      Needs documentation:  1
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by seokhun kim):

 * owner:  nobody => seokhun kim
 * status:  new => assigned
 * version:  2.1 => master
 * needs_docs:  0 => 1


Old description:

> (Please refer to Pull Request: MRO of DeleteView was changed)
>
> I think MRO of DeleteView need to be changed in order to clarify the
> inheritance hierarchy.
> So I refactored BaseDeleteView and DeleteMixin.
>
> * (1) What is better as the super class of BaseDeleteView ?
>   * Currently BaseDeleteView inherits from BaseDetailView.
>   * I think SingleObjectMixin is sufficient.
>   * I think Inheritance of Mixin is better than generic view itself.
>   * So I deleted BaseDetailView in the super class of BaseDeleteView.
> * In order to inherit SingleObjectMixin instead of BaseDetailView,
>   * BaseDeleteView inherits from DeletionMixin.
>   * DeletionMixin inherits from SingleObjectMixin.
> * (2) Where is better on the location of get(), post(), delete() methods
> ?
>   * Currently DeleteMixin provides those methods.
>   * It is bad that Mixin class provides those methods, I think.
>   * So My change is that BaseDeleteView provides get(), post() and
> delete() methods.

New description:

 (Please refer to Pull Request-10362-Updated inheritance chain of the
 generic DeleteView)

 I think MRO of DeleteView need to be changed in order to clarify the
 inheritance hierarchy.
 So I refactored BaseDeleteView and DeleteMixin.

 * (1) What is better as the super class of BaseDeleteView ?
   * Currently BaseDeleteView inherits from BaseDetailView.
   * I think SingleObjectMixin is sufficient.
   * I think Inheritance of Mixin is better than generic view itself.
   * So I deleted BaseDetailView in the super class of BaseDeleteView.
 * In order to inherit SingleObjectMixin instead of BaseDetailView,
   * BaseDeleteView inherits from DeletionMixin.
   * DeletionMixin inherits from SingleObjectMixin.
 * (2) Where is better on the location of get(), post(), delete() methods ?
   * Currently DeleteMixin provides those methods.
   * It is bad that Mixin class provides those methods, I think.
   * So My change is that BaseDeleteView provides get(), post() and
 delete() methods.

--

Comment:

 Documentation exists in the Pull Request-10362-Updated inheritance chain
 of the generic DeleteView.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29735#comment:1>
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/064.fe2da9682b78b185f92bad2c3d902448%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to