Last active
February 11, 2016 14:39
-
-
Save juanmhidalgo/c0280cae50c2ca9c91d7 to your computer and use it in GitHub Desktop.
[django] ClassBasedView with csrf_exempt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.views.generic.base import View | |
from django.views.decorators.csrf import csrf_exempt | |
from django.utils.decorators import method_decorator | |
class ExampleView(View): | |
@method_decorator(csrf_exempt) | |
def dispatch(self, request, *args, **kwargs): | |
return super(ExampleView, self).dispatch(request, *args, **kwargs) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment