8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-24 20:33:11 +00:00

Ask to use another user

Make login page Django-complient so now other page can redirect to
the login view if the user has unsufficient rights.
This commit is contained in:
Alexandre Iooss 2019-02-15 18:34:10 +01:00 committed by Alexandre IOOSS
parent 0bc1734cf3
commit e4f78adeca

View file

@ -29,6 +29,15 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% block title %}{% trans "Log in" %}{% endblock %}
{% block content %}
{% if user.is_authenticated %}
<p class="errornote">
{% blocktrans trimmed %}
You are authenticated as {{ username }}, but are not authorized to
access this page. Would you like to login to a different account?
{% endblocktrans %}
</p>
{% endif %}
<form method="post" action="">
{% csrf_token %}
{% bootstrap_form form %}