from django.conf.urls.static import static
from django.contrib import admin
from django.urls import path, include
from . import settings
from django.contrib.auth.views import LoginView, LogoutView, PasswordChangeView, PasswordChangeDoneView, PasswordResetView, PasswordResetDoneView,PasswordResetConfirmView,PasswordResetCompleteView


urlpatterns = [
    path('', include('accueil.urls'), name='accueil'),
    path('admin/', admin.site.urls),
    path('login/', LoginView.as_view(template_name='login.html', redirect_authenticated_user=True), name='login'),
    path('logout/', LogoutView.as_view(), name='logout'),
    path('change-password/', PasswordChangeView.as_view(template_name='password_change_form.html'), name='password_change'),
    path('change-password-done/', PasswordChangeDoneView.as_view(template_name='password_change_done.html'), name='password_change_done'),
    path('reset_password/', PasswordResetView.as_view(template_name="reset_password.html",
                                                      email_template_name='password_reset_email.html'),
         name='reset_password'),
    path('reset_password_sent/', PasswordResetDoneView.as_view(template_name="password_reset_sent.html"),
         name='password_reset_done'),
    path('reset/<uidb64>/<token>', PasswordResetConfirmView.as_view(template_name="password_reset_form.html"),
         name='password_reset_confirm'),
    path('reset_password_complete/', PasswordResetCompleteView.as_view(template_name="password_reset_done.html"),
         name='password_reset_complete'),
    path('utilisateur/', include('utilisateus.urls')),
    path('reunion/', include('reunions.urls'), name='reunions'),
    path('enquete/', include('enquetes.urls'), name='enquetes'),

]
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATICFILES_DIRS)