Mercurial > public > sg101
view sg101/templates/navbar.html @ 1224:d7c7a4777dd7 modernize tip
Add unit tests for contests template tags.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Mon, 10 Mar 2025 20:28:14 -0500 |
parents | 7cfa4bbe0a09 |
children |
line wrap: on
line source
{% load messages_tags %} <ul> {% if user.is_authenticated %} <li>Welcome, <a href="{% url 'bio-me' %}">{{ user.username }}</a></li> <li><a href="{% url 'forums-index' %}">Forums</a></li> <li>{% unread_messages %}</li> <li><a href="{% url 'haystack_search' %}">Search</a></li> <li><a href="{% url 'accounts-logout' %}">Logout</a></li> {% else %} <li> {% if request.path != "/accounts/logout/" %} <a id="login-link" href="{% url 'accounts-login' %}?next={{ request.path }}">Login</a> {% else %} <a id="login-link" href="{% url 'accounts-login' %}">Login</a> {% endif %} </li> <li><a href="{% url 'accounts-register' %}">Register</a></li> {% endif %} </ul>