Last Updated: February 25, 2016
·
581
· mnothic

django decorate method

most developers django don't use OOP and they write raw function and use decorators like

@csrf_exempt

but if you think in OOP/AOP and need this in a class method use this:

@methoddecorator(csrfexempt)

and then you decorate the function into the class view.