[Answered ]-Django class based DetailView/ListView ajax decorator?

2👍

To decorate all class based views, decorate the dispatch method.

class MyView(View):
    @decorate
    def dispatch(self, *args, **kwargs):
        return super(MyView, self).dispatch(*args, **kwargs)

Leave a comment