Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 10. Logging Users In and Out

10. Logging Users In and Out

Django lets you keep track of who’s logged in on your site, and you can track users from page to page, as you’ll see in this chapter. Here, we’re going to create an application that lets users log in, greets them by name when they do, and lets them log out.

The application is named login, and it will consist of three pages: a main page that greets users by name if they’re logged in or, if they’re not logged in, invites them to log in; a login page with text fields for username and password; and a logout page (which is actually not a page at all—it’s just a view that logs users out and returns them to the main page).


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial