fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Dodanie login_required. Automatyczne tworzenie branchy, przy pierwszym użyciu.
[redakcja.git]
/
project
/
templates
/
registration
/
head_login.html
diff --git
a/project/templates/registration/head_login.html
b/project/templates/registration/head_login.html
index
d6df7fe
..
ded03e9
100644
(file)
--- a/
project/templates/registration/head_login.html
+++ b/
project/templates/registration/head_login.html
@@
-1,6
+1,10
@@
{% if user.is_authenticated %}
{% 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.
user
name }}</span> |
+<a href='{% url django.contrib.auth.views.logout %}?next={{request.get_full_path}}'>Wyloguj</a>
{% else %}
{% 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 %}
{% endif %}