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)
Source:stackexchange.com