Opened 6 years ago

Last modified 6 years ago

#29735 closed Cleanup/optimization

MRO of DeleteView need to be changed. — at Version 1

Reported by: seokhun kim Owned by: seokhun kim
Component: Generic views Version: dev
Severity: Normal Keywords: deletemixin, basedeleteview, deleteview, generic view
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: yes
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description (last modified by seokhun kim)

(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.

Change History (1)

comment:1 by seokhun kim, 6 years ago

Description: modified (diff)
Needs documentation: set
Owner: changed from nobody to seokhun kim
Status: newassigned
Version: 2.1master

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

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