def class_view_decorator(function_decorator):
    def simple_decorator(View):
        View.dispatch = method_decorator(function_decorator)(View.dispatch)
        return View
    return simple_decorator
Converts a function based decorator into a class based decorator usable
dataset/ETHPy150Open Bouke/django-two-factor-auth/two_factor/views/utils.py/class_view_decorator