schema change; added flask-login

This commit is contained in:
Yusur 2019-10-12 19:22:10 +02:00
parent 3f867b4027
commit a646c96b86
8 changed files with 100 additions and 74 deletions

View file

@ -12,14 +12,14 @@
<div class="header">
<h1><a href="{{ url_for('homepage') }}">{{ site_name }}</a></h1>
<div class="metanav">
{% if not session.logged_in %}
{% if current_user.is_anonymous %}
<a href="{{ url_for('login') }}">log in</a>
<a href="{{ url_for('register') }}">register</a>
{% else %}
<a href="{{ url_for('user_detail', username=current_user.username) }}">{{ current_user.username }}</a>
{% set notification_count = current_user.unseen_notification_count() %}
{% if notification_count > 0 %}
<a href="{{ url_for('notifications') }}">({{ notification_count }})</a>
<a href="{{ url_for('notifications') }}">(<strong>{{ notification_count }}</strong>)</a>
{% endif %}
-
<a href="{{ url_for('public_timeline') }}">explore</a>