def class_decorator(decorator):
    def inner(cls):
        orig_dispatch = cls.dispatch
        @method_decorator(decorator)
        def new_dispatch(self, request, *args, **kwargs):
            return orig_dispatch(self, request, *args, **kwargs)
        cls.dispatch = new_dispatch
        return cls
    return inner
usage:
dataset/ETHPy150Open baskoopmans/djcommon/djcommon/decorators.py/class_decorator