Grokking Django
0% completed
Implementing Login, Logout, and Access Restrictions
A plain link to the logout page, such as <a href="/accounts/logout/">Log out</a>, does not log anyone out in current Django. The server answers 405 Method Not Allowed, because the built-in logout view accepts only POST requests. The reason is safety: if a GET request could log a user out, any other website could log your readers out by embedding that URL in an image tag. This lesson builds the blog's login and logout pages the current way, and then closes pages to visitors who have not logged in.
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%