Skip to content

Instantly share code, notes, and snippets.

@andreagrandi
Created October 17, 2013 13:08
Show Gist options
  • Save andreagrandi/7024561 to your computer and use it in GitHub Desktop.
Save andreagrandi/7024561 to your computer and use it in GitHub Desktop.
Class used to disable CSRF check. Include this class in MIDDLEWARE_CLASSES in settings.py
class DisableCSRF(object):
def process_request(self, request):
setattr(request, '_dont_enforce_csrf_checks', True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment