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.
Written by theManda
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Python
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#