19.1 Introduction

When we built our forms in Chapter 7: Allowing User Input with Forms, we enabled anyone visiting our site to submit data to the website. Allowing anyone and anything to submit data to a website is a terrible idea. Pseudonymity (and for most users, assumption of anonymity) makes the World Wide Web a bit of a Wild West, and the addition of bots and zombie machines makes unfettered access to a website like ours a very dangerous thing.

To mitigate all of these problems, websites ask visitors who wish to submit data to first log in: visitors identify themselves and then authenticate, providing secret proof that they are who they claim they are.

Authentication is one of the most difficult and tricky parts of application building ...

Get Django Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.