Dyxless
{% if not current_user.is_authenticated %} {% if url_for(request.endpoint) != url_for('auth.login') %}
Войти
{% endif %} {% if url_for(request.endpoint) != url_for('auth.signup') %}
Зарегистрироваться
{% endif %} {% else %}
{{ current_user.username }}
Профиль
Выйти
{% endif %}
{% with messages = get_flashed_messages(with_categories=true) %} {% if messages %} {% for category, text in messages%}
{{ text }}
{% endfor %} {% endif %} {% endwith %} {% block content %} {% endblock %}