The UserEditView view add the "user" context variable and confuses the base.html template. Update the base template to use *request.user* instead of just *user* to access the currently logged user. GitLab issue #295.

This commit is contained in:
Roberto Rosario
2016-06-06 05:15:37 -04:00
parent 883e623a15
commit 043233f79e

View File

@@ -68,10 +68,10 @@
{% endfor %}
</ul>
<ul class="nav navbar-nav navbar-right">
{% if not user.is_authenticated %}
{% if not request.user.is_authenticated %}
{% trans 'Anonymous' %}
{% else %}
<li><a href="{% url 'common:current_user_details' %}" title="{% trans 'User details' %}">{{ user.get_full_name|default:user }} <i class="fa fa-user"></i></a></li>
<li><a href="{% url 'common:current_user_details' %}" title="{% trans 'User details' %}">{{ request.user.get_full_name|default:request.user }} <i class="fa fa-user"></i></a></li>
{% endif %}
</ul>
</div>