Summary
In this chapter, we have examined Django's middleware implementation of authentication and sessions. We have learned how to incorporate authentication and permission logic into views and templates. We can set permissions on specific pages and limit their access to authenticated users. We have also examined how to store data in a user's session and render it in subsequent pages.
Now you have the skills to customize a Django project to deliver a personalized web experience. You can limit the content to authenticated or privileged users and you can personalize a user's experience based on their prior interactions. In the next chapter, we will revisit the Admin app and learn some advanced techniques to customize our user model and apply fine-grained changes to the admin interface for our models.