ernestophone.ens.fr/Ernestophone/urls.py
2020-01-04 01:02:33 +01:00

57 lines
1.9 KiB
Python

from django.contrib import admin
from django.contrib.auth import views as auth_views
from django.conf.urls.static import static
from django.conf import settings
from django.urls import include, path, reverse_lazy
from gestion import views as gestion_views
urlpatterns = [
path("", gestion_views.home, name="home"),
path("registration", gestion_views.inscription_membre, name="registration"),
path(
"login",
auth_views.LoginView.as_view(template_name="gestion/login.html"),
name="login"
),
path("logout", auth_views.LogoutView.as_view(next_page="home"), name="logout"),
path("change", gestion_views.change_membre, name="change_membre"),
path("password", gestion_views.change_password, name="change_password"),
path(
"user/password/reset",
auth_views.PasswordResetView.as_view(
success_url=reverse_lazy("password_reset_done")
),
name="password_reset"
),
path(
"user/password/reset/done",
auth_views.PasswordResetDoneView.as_view(),
name="password_reset_done",
),
path(
"user/password/reset/<uidb64>/<token>",
auth_views.PasswordResetConfirmView.as_view(),
name="password_reset_confirm",
),
path(
"user/password/done",
auth_views.PasswordResetCompleteView.as_view(),
name="password_reset_complete"
),
path("admin/", admin.site.urls),
path("partitions/", include('partitions.urls')),
path("pads/", include('pads.urls')),
path("calendar/", include('calendrier.urls')),
path("propositions/", include('propositions.urls')),
path("divers/", gestion_views.divers),
]
if "debug_toolbar" in settings.INSTALLED_APPS:
import debug_toolbar
urlpatterns = [
path("__debug__/", include(debug_toolbar.urls)),
] + urlpatterns
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)