Opened 6 years ago

Last modified 6 years ago

#29735 closed Cleanup/optimization

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

Reported by: seokhun kim Owned by: nobody
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

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

Change History (0)

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