problem in update/delete view

The get_queryset method must return a queryset, not a list of dict.

Also note that:

is going to return a queryset, and not an individual instance of Comments.

You’re also doing a lot more work than necessary in the methods you are overriding. I suggest you familiarize yourself with the inner workings of an UpdateView to understand what it does. I recommend the Classy Class-Based Views site for browsing the source code, and the CBV diagrams page to help with understanding the sequence of events.

Specifically, for example, you have multiple cases where you set self.object from self.get_object, but in almost every case, you don’t need to do that - that’s part of the parent class’ responsibility.