Without proper precautions, malicious sites could potentially invoke requests against your site that would result in undesired changes on your server, such as affecting a user's authentication, altering content, or accessing sensitive information. Django comes bundled with a system for preventing CSRF attacks such as these, and we'll review that in this recipe.
Making forms secure from Cross Site Request Forgery (CSRF)
Getting ready
Start with the email_messages app that was created in the Passing the HttpRequest to a form recipe from Chapter 3, Forms and Views.