Book Image

Learning Website Development with Django

Book Image

Learning Website Development with Django

Overview of this book

Table of Contents (18 chapters)
Learning Website Development with Django
Credits
About the Author
About the Reviewers
Preface
Index

Summary


In this chapter, you have learnt a lot about the user authentication and management system that comes with Django. This system provides features ranging from session handling to account maintenance. You used this system to allow the users of our social bookmarking application to register on the site and authenticate themselves by logging in. In the process, you learned about the Django form library and utilized it to build a registration form with input validation, and you also learned how to derive templates from a base template, which is very important in organizing the site's structure and reusing template code.

Here is a summary of the Django features covered in this chapter:

  • The User object of the current user is accessible from the request.user attribute of the HttpRequest object passed to the view.

  • Because loading a template, rendering it and wrapping it in an HttpResponse object is such a common task, Django provides a shortcut for it called render_to_response. This function...