X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/cb87c787916de7712a4f9fb638715e6185804711..39e235fcc4bffec8893cf9a2f8924303c7b3a859:/project/templates/registration/head_login.html

diff --git a/project/templates/registration/head_login.html b/project/templates/registration/head_login.html
index d6df7fe7..ded03e97 100644
--- a/project/templates/registration/head_login.html
+++ b/project/templates/registration/head_login.html
@@ -1,6 +1,10 @@
 {% if user.is_authenticated %}
-<span class="user_name">{{ user.get_full_name }}</span> | 
-<a href='{% url django.contrib.auth.views.logout %}?next_page={{request.get_full_path}}'>Wyloguj</a>
+<span class="user_name">{{ user.username }}</span> | 
+<a href='{% url django.contrib.auth.views.logout %}?next={{request.get_full_path}}'>Wyloguj</a>
 {% else %}
-<a href='{% url django.contrib.auth.views.login %}?next_page={{request.get_full_path}}'>Logowanie</a>
+{% url django.contrib.auth.views.login as login_url %}
+{% ifnotequal login_url request.path %}
+    <a href='{% url django.contrib.auth.views.login %}?next={{request.get_full_path}}'>Logowanie</a>
+{% endifnotequal %}
+
 {% endif %}