Use session to store authentication info instead of cookie
This commit is contained in:
@@ -76,10 +76,10 @@
|
||||
<h1>jon</h1>
|
||||
<nav>
|
||||
<ul>
|
||||
<li {{ "class=current-page" if request.path == "/" else "" }}><a href="/">Home</a></li>
|
||||
<li {{ "class=current-page" if request.path.startswith("/inventory") else "" }}><a href="/inventory">Inventar</a></li>
|
||||
<li {{ "class=current-page" if request.path.startswith("/entry") else "" }}><a href="/entry">Eintragen</a></li>
|
||||
<li {{ "class=current-page" if request.path.startswith("/location") else "" }}>
|
||||
<li{{ " class=current-page" if request.path == "/" else "" }}><a href="/">Home</a></li>
|
||||
<li{{ " class=current-page" if request.path.startswith("/inventory") else "" }}><a href="/inventory">Inventar</a></li>
|
||||
<li{{ " class=current-page" if request.path.startswith("/entry") else "" }}><a href="/entry">Eintragen</a></li>
|
||||
<li{{ " class=current-page" if request.path.startswith("/location") else "" }}>
|
||||
<a href="/location">
|
||||
{% if "location" not in session %}
|
||||
Raum wählen
|
||||
@@ -88,7 +88,7 @@
|
||||
{% endif %}
|
||||
</a>
|
||||
</li>
|
||||
<li {{ "class=current-page" if request.path.startswith("/logout") else "" }}><a href="/logout">Logout</a></li>
|
||||
<li{{ " class=current-page" if request.path.startswith("/auth/logout") else "" }}><a href="/auth/logout">Logout</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<form method="POST" action=".">
|
||||
<form method="POST">
|
||||
<select name="location_id">
|
||||
<option value="" {{ "selected" if "location" not in session else ""}}>-</option>
|
||||
{% for location in locations %}
|
||||
|
||||
Reference in New Issue
Block a user