2👍
{% if user.is_authenticated %}
<nav> navbar to show when authenticated </nav>
{% else %}
<nav> navbar to show when user is not authenticated </nav>
{% endif %}
and you can use it on your base html if the navbar is used in all pages
Source:stackexchange.com