login, logout and profile buttons now depend on the user authentification

This commit is contained in:
Faraphel 2024-01-04 21:55:57 +01:00
parent 19427d3e34
commit e9b67b11d8

View file

@ -10,8 +10,11 @@
<div id="navigation-buttons"> <div id="navigation-buttons">
<a href="{% url "Palto:homepage" %}">Home</a> <a href="{% url "Palto:homepage" %}">Home</a>
{% if request.user.is_authenticated %}
<a href="{% url "Palto:my_profile" %}">Profile</a> <a href="{% url "Palto:my_profile" %}">Profile</a>
<a href="{% url "Palto:login" %}">Login</a>
<a href="{% url "Palto:logout" %}">Logout</a> <a href="{% url "Palto:logout" %}">Logout</a>
{% else %}
<a href="{% url "Palto:login" %}">Login</a>
{% endif %}
</div> </div>
</nav> </nav>