Add login, user_edit, user_info

This commit is contained in:
David Hoppenbrouwers
2022-10-07 14:37:18 +02:00
parent d72fd14c92
commit 6f3b4de047
8 changed files with 151 additions and 8 deletions

View File

@@ -5,8 +5,18 @@
<body>
<nav>
<a href="{{ url_for('index') }}">Home</a>
{% if 'user_id' in session %}
<a href="{{ url_for('user_edit') }}">{{ session.get('username', '???') }}</a>
|
<a href="{{ url_for('logout') }}">Logout</a>
{% else %}
<a href="{{ url_for('login') }}">Login</a>
{% endif %}
</nav>
<h1>{{ title }}</h1>
{% for category, msg in get_flashed_messages(True) %}
<p>{{ category}}: {{ msg }}</p>
{% endfor %}
<main>
{% block content %}{% endblock %}
</main>