basxsoftwareassociation / bread

Engine to create database applications based on Django and the IBM Carbon Design System
BSD 3-Clause "New" or "Revised" License
19 stars 2 forks source link

make DeleteView model instance available in subclasses #113

Closed wipascal closed 2 years ago

wipascal commented 2 years ago

I want to be able to use the instance in a subclass...

saemideluxe commented 2 years ago

Hmm... a few comments to the delete view in general:

If you do not want to invest too much time here I suggest you just move the instance-loading into the dispatch method, so that the instance would be available in all possible HTTP method handlers.

wipascal commented 2 years ago

The nice thing about the class-based views is that it is easy to create instances for different models. If we just have one view function def hard_delete(request, pk), how can this be used for different models? Or are you talking about a function def generate_hard_delete_view(model) which returns the actual view function?

wipascal commented 2 years ago

never mind, I don't need this anymore for my basxconnect changes