ernestophone.ens.fr/Ernestophone/urls.py
2018-01-05 00:08:25 +01:00

40 lines
1.7 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
from gestion import views as gestion_views
urlpatterns = [
path("", gestion_views.home, name="home"),
path("login", gestion_views.login, name="login"),
path("logout", auth_views.logout, {"next_page": "/"}, name="logout"),
path("registration", gestion_views.inscription_membre, name="registration"),
path("change", gestion_views.change_membre, name="change_membre"),
path("password", gestion_views.change_password, name="change_password"),
path("user/password/reset", auth_views.password_reset,
{"post_reset_redirect": "/user/password/reset/done/"},
name="password_reset"),
path("user/password/reset/done", auth_views.password_reset_done),
path("user/password/reset/<uidb64>/<token>/", auth_views.password_reset_confirm,
{'post_reset_redirect': '/user/password/done/'},
name="password_reset_confirm"),
path("user/password/done", auth_views.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
from django.conf.urls import include, url
urlpatterns = [
url(r"^__debug__/", include(debug_toolbar.urls)),
] + urlpatterns
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)