﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
25146	Allow method_decorator to work at the class level	George Brocklehurst	Rigel Di Scala	"Allowing `method_decorator` to be applied at the class level would avoid situations where a superclass method is re-declared, just to apply a decorator.

The following would be equivalent:

{{{
#!python
class ProtectedView(generic.TemplateView):
    template_name = 'secret.html'

    @method_decorator(login_required)
    def dispatch(self, *args, **kwargs):
        return super(ProtectedView, self).dispatch(*args, **kwargs)
}}}

{{{
#!python
@method_decorator(login_required, name='dispatch')
class ProtectedView(generic.TemplateView):
    template_name = 'secret.html'
}}}

This idea comes from a comment by timgraham on #25138."	New feature	closed	Utilities	dev	Normal	fixed	method_decorator		Accepted	1	0	0	1	0	0
