refactor: Mise à jour de la doc swagger / URL

This commit is contained in:
N3WT DE COMPET
2025-02-13 21:59:25 +01:00
parent cce78355a3
commit 4c95b6a83f
13 changed files with 326 additions and 359 deletions

View File

@ -1,61 +1,51 @@
from django.urls import path, re_path
from School.views import (
TeachersView,
TeacherView,
SpecialitiesView,
SpecialityView,
ClassesView,
ClasseView,
PlanningsView,
PlanningView,
FeesView,
FeeView,
DiscountsView,
DiscountView,
PaymentPlansView,
PaymentPlanView,
PaymentModesView,
PaymentModeView,
EstablishmentsView,
EstablishmentView
from .views import (
TeacherListCreateView,
TeacherDetailView,
SpecialityListCreateView,
SpecialityDetailView,
SchoolClassListCreateView,
SchoolClassDetailView,
PlanningListCreateView,
PlanningDetailView,
FeeListCreateView,
FeeDetailView,
DiscountListCreateView,
DiscountDetailView,
PaymentPlanListCreateView,
PaymentPlanDetailView,
PaymentModeListCreateView,
PaymentModeDetailView,
EstablishmentListCreateView,
EstablishmentDetailView
)
urlpatterns = [
re_path(r'^specialities$', SpecialitiesView.as_view(), name="specialities"),
re_path(r'^speciality$', SpecialityView.as_view(), name="speciality"),
re_path(r'^speciality/([0-9]+)$', SpecialityView.as_view(), name="speciality"),
re_path(r'^specialities$', SpecialityListCreateView.as_view(), name="speciality_list_create"),
re_path(r'^specialities/(?P<id>[0-9]+)$', SpecialityDetailView.as_view(), name="speciality_detail"),
re_path(r'^teachers$', TeachersView.as_view(), name="teachers"),
re_path(r'^teacher$', TeacherView.as_view(), name="teacher"),
re_path(r'^teacher/([0-9]+)$', TeacherView.as_view(), name="teacher"),
re_path(r'^teachers$', TeacherListCreateView.as_view(), name="teacher_list_create"),
re_path(r'^teachers/(?P<id>[0-9]+)', TeacherDetailView.as_view(), name="teacher_detail"),
re_path(r'^schoolClasses$', ClassesView.as_view(), name="schoolClasses"),
re_path(r'^schoolClass$', ClasseView.as_view(), name="schoolClass"),
re_path(r'^schoolClass/([0-9]+)$', ClasseView.as_view(), name="schoolClass"),
re_path(r'^schoolClasses$', SchoolClassListCreateView.as_view(), name="school_class_list_create"),
re_path(r'^schoolClasses/(?P<id>[0-9]+)', SchoolClassDetailView.as_view(), name="school_class_detail"),
re_path(r'^plannings$', PlanningsView.as_view(), name="plannings"),
re_path(r'^planning$', PlanningView.as_view(), name="planning"),
re_path(r'^planning/([0-9]+)$', PlanningView.as_view(), name="planning"),
re_path(r'^plannings$', PlanningListCreateView.as_view(), name="planninglist_create"),
re_path(r'^plannings/(?P<id>[0-9]+)$', PlanningDetailView.as_view(), name="planning_detail"),
re_path(r'^fees/(?P<_filter>[a-zA-z]+)$', FeesView.as_view(), name="fees"),
re_path(r'^fee$', FeeView.as_view(), name="fee"),
re_path(r'^fee/([0-9]+)$', FeeView.as_view(), name="fee"),
re_path(r'^fees$', FeeListCreateView.as_view(), name="fee_list_create"),
re_path(r'^fees/(?P<id>[0-9]+)$', FeeDetailView.as_view(), name="fee_detail"),
re_path(r'^discounts/(?P<_filter>[a-zA-z]+)$$', DiscountsView.as_view(), name="discounts"),
re_path(r'^discount$', DiscountView.as_view(), name="discount"),
re_path(r'^discount/([0-9]+)$', DiscountView.as_view(), name="discount"),
re_path(r'^discounts$', DiscountListCreateView.as_view(), name="discount_list_create"),
re_path(r'^discounts/(?P<id>[0-9]+)$', DiscountDetailView.as_view(), name="discount_detail"),
re_path(r'^paymentPlans/(?P<_filter>[a-zA-z]+)$', PaymentPlansView.as_view(), name="paymentPlans"),
re_path(r'^paymentPlan$', PaymentPlanView.as_view(), name="paymentPlan"),
re_path(r'^paymentPlan/([0-9]+)$', PaymentPlanView.as_view(), name="paymentPlan"),
re_path(r'^paymentPlans$', PaymentPlanListCreateView.as_view(), name="payment_plan_list_create"),
re_path(r'^paymentPlans/(?P<id>[0-9]+)$', PaymentPlanDetailView.as_view(), name="payment_plan_detail"),
re_path(r'^paymentModes/(?P<_filter>[a-zA-z]+)$', PaymentModesView.as_view(), name="paymentModes"),
re_path(r'^paymentMode$', PaymentModeView.as_view(), name="paymentMode"),
re_path(r'^paymentMode/([0-9]+)$', PaymentModeView.as_view(), name="paymentMode"),
re_path(r'^establishments$', EstablishmentsView.as_view(), name="establishments"),
re_path(r'^establishment$', EstablishmentView.as_view(), name='establishment'),
re_path(r'^establishment/([0-9]+)$', EstablishmentView.as_view(), name='establishment')
re_path(r'^paymentModes$', PaymentModeListCreateView.as_view(), name="payment_mode_list_create"),
re_path(r'^paymentModes/(?P<id>[0-9]+)$', PaymentModeDetailView.as_view(), name="payment_mode_detail"),
re_path(r'^establishments$', EstablishmentListCreateView.as_view(), name='establishment_list_create'),
re_path(r'^establishments/(?P<id>[0-9]+)$', EstablishmentDetailView.as_view(), name="establishment_detail"),
]