ernestophone.ens.fr/Ernestophone/urls.py

58 lines
1.9 KiB
Python
Raw Normal View History

2015-03-17 19:03:51 +01:00
from django.contrib import admin
from django.contrib.auth import views as auth_views
2015-03-17 19:03:51 +01:00
from django.conf.urls.static import static
from django.conf import settings
2020-01-04 01:02:33 +01:00
from django.urls import include, path, reverse_lazy
2015-03-17 19:03:51 +01:00
from gestion import views as gestion_views
2015-03-17 19:03:51 +01:00
2018-01-04 23:33:31 +01:00
urlpatterns = [
2018-01-04 23:33:31 +01:00
path("", gestion_views.home, name="home"),
path("registration", gestion_views.inscription_membre, name="registration"),
2020-01-04 01:02:33 +01:00
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"),
2018-01-04 23:33:31 +01:00
path("change", gestion_views.change_membre, name="change_membre"),
path("password", gestion_views.change_password, name="change_password"),
2020-01-04 01:02:33 +01:00
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"
),
2018-01-04 23:33:31 +01:00
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),
]
2015-03-17 19:03:51 +01:00
2018-01-05 00:06:24 +01:00
if "debug_toolbar" in settings.INSTALLED_APPS:
import debug_toolbar
urlpatterns = [
2020-01-04 01:02:33 +01:00
path("__debug__/", include(debug_toolbar.urls)),
2018-01-05 00:06:24 +01:00
] + urlpatterns
2015-03-17 19:03:51 +01:00
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)