from django.utils.decorators import method_decorator def decorate_dispatch(decorator): def decorate(cls): setattr(cls, 'dispatch', method_decorator(decorator)(cls.dispatch)) return cls return decorate