Add login/logout links and templates
This commit is contained in:
parent
bff06c1de2
commit
c96bd0d0db
3 changed files with 77 additions and 6 deletions
|
|
@ -9,9 +9,9 @@
|
|||
<div id="user-tools">
|
||||
{% if user.is_authenticated %}
|
||||
{% block welcome-msg %}Bienvenue <strong>{% firstof user.username %}</strong>.{% endblock %}
|
||||
<a href="{% url 'home' %}">Site public</a> <a href="{% url 'admin:index' %}">Admin</a>
|
||||
<a href="{% url 'logout' %}">Déconnexion</a>
|
||||
{% else %}
|
||||
<a href="{% url 'admin:index' %}">Admin</a>
|
||||
<a href="{% url 'login' %}?next={{ request.path }}">Connexion</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue