Implement a simple logout mechanism
I would have done a DELETE to /login/ to make it like a resource but my browser won't do a raw <form> with method="DELETE" :(
This commit is contained in:
parent
94b78dacca
commit
861b6f0f71
2 changed files with 13 additions and 3 deletions
|
@ -2,6 +2,9 @@
|
|||
<body>
|
||||
{% if current_user and current_user.is_authenticated %}
|
||||
<h1>Hello {{ current_user.name }} from Vanth</h1>
|
||||
<form action="/logout/" method="POST">
|
||||
<input type="submit">Log out</input>
|
||||
</form>
|
||||
{% else %}
|
||||
<h1>Please log in</h1>
|
||||
<form action="/login/" method="POST">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue