1 2 3 | class IgnoreCsrfMiddleware(object):
def process_request(self, request):
request.csrf_processing_done = True
|
More like this
- Add CSRF token to templates by coleifer 1 year, 10 months ago
- Middleware to resolve current URL to module and view by kuchin 2 years, 10 months ago
- CSRF this! by oggy 4 years, 8 months ago
- RequestMiddleware by martync 3 years, 11 months ago
- Strip Google Analytics cookies for caching middleware purposes by nf 3 years, 7 months ago
Comments
Works great - to clarify you add it like so (in settings.py):
#
If you are going to ignore the csrf why adding the middleware in the first place?
#