Without the proper precautions, malicious sites could potentially invoke requests against your website, which would result in undesired changes being made to your server. For example, they could affect a user's authentication or alter content without the user's consent. 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 ideas app that we created in the Creating an app with CRUDL functions recipe in Chapter 3, Forms and Views.