from django.urls import path
from . import views,pdf_views,other_admin_views,password_views
from django.contrib.auth.views import LogoutView
from django.views.generic import TemplateView

app_name = 'BasicData'
urlpatterns = [
    #path('', TemplateView.as_view(template_name="BasicData/welcome.html"), name='Home'),
    path('', views.loginView, name="Home"),
    path('login', views.loginView, name="login"),
    path('logout', LogoutView.as_view(next_page="BasicData:Home", template_name="BasicData/login.html"), name="logout"),
    path('profile', LogoutView.as_view(next_page="BasicData:Home", template_name="BasicData/login.html"), name="logout"),
    path('test/', views.test_view, name="test_view"),
    path('bulletin/', pdf_views.bulletin_pdf_view, name="bulletin"),
    path('remplir', views.remplissage),
    path("check_account", password_views.check_account, name="check_account"),
    path("renew_password/<int:id>/", password_views.renew_password, name="renew_password"),
    path("renew_done/", password_views.renew_done, name="renew_done"),



    # CUSTOM ADMIN URLS
    path('usp_admin/', other_admin_views.custom_admin, name="usp_admin"),

    # ETUDIANT
    path('etudiant_list/', other_admin_views.etudiant_list, name="etudiant_list"),
    path('etudiant_add/', other_admin_views.etudiant_add, name="etudiant_add"),
    path('etudiant_edit/<int:id>/', other_admin_views.etudiant_edit, name="etudiant_edit"),
    path('etudiant_edit/<int:id>/', other_admin_views.etudiant_edit, name="etudiant_edit"),

    # ENSEIGNANT
    path('enseignant_list/', other_admin_views.enseignant_list, name="enseignant_list"),
    path('enseignant_add/', other_admin_views.enseignant_add, name="enseignant_add"),
    path('enseignant_edit/<int:id>/', other_admin_views.enseignant_edit, name="enseignant_edit"),
    path('enseignant_ufr_list/<int:id>/', other_admin_views.enseignant_ufr_list, name="enseignant_ufr_list"),

    # SCOLARITE
    path('agent_scolartie_list/', other_admin_views.ag_scolartie_list, name="ag_scolartie_list"),
    path('agent_ag_scolartie_add/', other_admin_views.ag_scolartie_add, name="ag_scolartie_add"),
    path('ag_scolarite_edit/<int:id>/', other_admin_views.ag_scolarite_edit, name="ag_scolarite_edit"),

    # PERSONNEL
    path('personnel_list/', other_admin_views.personnel_list, name="personnel_list"),
    path('personnel_edit/<int:id>/', other_admin_views.personnel_edit, name="personnel_edit"),
]