Installation d'allauth ENS
This commit is contained in:
parent
754034cd57
commit
9bdc6c277f
6 changed files with 25 additions and 12 deletions
|
@ -34,9 +34,9 @@
|
|||
<li><a href="{% url 'avisstage:moderation' %}">Modo</a></li>
|
||||
{% endif %}
|
||||
{% if user.is_authenticated %}
|
||||
<li><a href="{% url 'logout' %}"><span class="username">{{ user.username }}</span><br/> Déconnexion</a></li>
|
||||
<li><a href="{% url "account_logout" %}"><span class="username">{{ user.username }}</span><br/> Déconnexion</a></li>
|
||||
{% else %}
|
||||
<li><a href="{% url 'login' %}">Connexion</a></li>
|
||||
<li><a href="{% url "account_login" %}">Connexion</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</nav>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
{% if not user.is_authenticated %}
|
||||
<div class="entrer">
|
||||
<p><a href="{% url 'login' %}" class="btn">Connexion</a></p>
|
||||
<p><a href="{% url "account_login" %}" class="btn">Connexion</a></p>
|
||||
<p class="helptext">Connexion via le serveur central d'authentification ENS (identifiants clipper)</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
|
|
@ -18,7 +18,7 @@ urlpatterns = [
|
|||
url(r'^stages/majs/$', views.StageListe.as_view(), name='stage_majs'),
|
||||
|
||||
url(r'^lieu/save/$', views.save_lieu, name='lieu_ajout'),
|
||||
url(r'^profil/show/(?P<username>\w+)/$', views.ProfilView.as_view(),
|
||||
url(r'^profil/show/(?P<username>[\w@]+)/$', views.ProfilView.as_view(),
|
||||
name='profil'),
|
||||
url(r'^profil/edit/$', views.ProfilEdit.as_view(), name='profil_edit'),
|
||||
url(r'^recherche/$', views.recherche, name='recherche'),
|
||||
|
|
|
@ -29,11 +29,21 @@ INSTALLED_APPS = (
|
|||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
'django.contrib.gis',
|
||||
'django.contrib.sites',
|
||||
|
||||
'django_elasticsearch_dsl',
|
||||
|
||||
'widget_tweaks',
|
||||
'allauth_ens',
|
||||
|
||||
'allauth',
|
||||
'allauth.account',
|
||||
'allauth.socialaccount',
|
||||
'allauth_cas',
|
||||
|
||||
'allauth_ens.providers.clipper',
|
||||
|
||||
'tastypie',
|
||||
'django_cas_ng',
|
||||
'braces',
|
||||
'tinymce',
|
||||
'taggit',
|
||||
|
@ -94,6 +104,7 @@ USE_L10N = True
|
|||
|
||||
USE_TZ = True
|
||||
|
||||
SITE_ID = 1
|
||||
|
||||
# Static files (CSS, JavaScript, Images)
|
||||
# https://docs.djangoproject.com/en/1.7/howto/static-files/
|
||||
|
@ -112,9 +123,10 @@ CAS_REDIRECT_URL = reverse_lazy('avisstage:perso')
|
|||
CAS_EMAIL_FORMAT = "%s@clipper.ens.fr"
|
||||
CAS_FORCE_CHANGE_USERNAME_CASE = "lower"
|
||||
CAS_VERSION = 'CAS_2_SAML_1_0'
|
||||
SOCIALACCOUNT_ADAPTER='allauth_ens.adapter.LongTermClipperAccountAdapter'
|
||||
|
||||
LOGIN_URL = reverse_lazy('login')
|
||||
LOGOUT_URL = reverse_lazy('logout')
|
||||
LOGIN_URL = reverse_lazy('account_login')
|
||||
LOGOUT_URL = reverse_lazy('account_logout')
|
||||
|
||||
|
||||
LOGGING = {
|
||||
|
|
|
@ -34,3 +34,6 @@ ELASTICSEARCH_DSL = {
|
|||
'hosts': 'localhost:9200'
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
CLIPPER_LDAP_SERVER = 'ldaps://localhost:636'
|
||||
|
|
|
@ -2,13 +2,11 @@ from django.conf import settings
|
|||
from django.conf.urls import include, url
|
||||
from django.contrib import admin
|
||||
|
||||
from django_cas_ng import views as django_cas_views
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^', include('avisstage.urls', namespace='avisstage')),
|
||||
|
||||
url(r'^login/$', django_cas_views.login, name = "login"),
|
||||
url(r'^logout/$', django_cas_views.logout, name = "logout"),
|
||||
url(r'^account/', include('allauth_ens.urls')),
|
||||
|
||||
url(r'^tinymce/', include('tinymce.urls')),
|
||||
url(r'^taggit_autosuggest/', include('taggit_autosuggest.urls')),
|
||||
url(r'^admin/', include(admin.site.urls)),
|
||||
|
|
Loading…
Reference in a new issue