Browse Source

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.
user_auth
Alexandre Iooss 7 years ago
committed by Alexandre IOOSS
parent
commit
e4f78adeca
  1. 9
      templates/registration/login.html

9
templates/registration/login.html

@ -29,6 +29,15 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% block title %}{% trans "Log in" %}{% endblock %} {% block title %}{% trans "Log in" %}{% endblock %}
{% block content %} {% 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=""> <form method="post" action="">
{% csrf_token %} {% csrf_token %}
{% bootstrap_form form %} {% bootstrap_form form %}

Loading…
Cancel
Save