Csrfmiddleware

CsrfMiddleware shields your forms from cross-site request forgery. It verifies tokens on POST requests and places fresh tokens in the request for future forms. When validation fails an error is stored in the request so the router can forward to an error page.