Multi-connexions

This commit is contained in:
Yohann D'ANELLO 2020-03-09 22:23:47 +01:00
parent 462a9e0f2d
commit 83b1ad4751
2 changed files with 6 additions and 2 deletions

View File

@ -37,8 +37,8 @@ if "cas" in settings.INSTALLED_APPS:
from cas import views as cas_views from cas import views as cas_views
urlpatterns += [ urlpatterns += [
# Include CAS Client routers # Include CAS Client routers
path('accounts/login/', cas_views.login, name='login'), path('accounts/login/cas/', cas_views.login, name='cas_login'),
path('accounts/logout/', cas_views.logout, name='logout'), path('accounts/logout/cas/', cas_views.logout, name='cas_logout'),
] ]
if "debug_toolbar" in settings.INSTALLED_APPS: if "debug_toolbar" in settings.INSTALLED_APPS:

View File

@ -17,6 +17,10 @@ SPDX-License-Identifier: GPL-2.0-or-later
</p> </p>
{% endif %} {% endif %}
<div class="alert alert-info">
Vous pouvez aussi vous connecter via l'authentification centralisée <a href="{% url 'cas_login' %}">en suivant ce lien.</a>
</div>
<form action="{{ app_path }}" method="post" id="login-form">{% csrf_token %} <form action="{{ app_path }}" method="post" id="login-form">{% csrf_token %}
{{ form | crispy }} {{ form | crispy }}
<input type="submit" value="{% trans 'Log in' %}" class="btn btn-primary"> <input type="submit" value="{% trans 'Log in' %}" class="btn btn-primary">