Ajout et début de l'API REST

This commit is contained in:
Ambulance Clerc
2023-12-14 13:55:25 +01:00
parent e7ca33031b
commit b9c93b53a9
16 changed files with 170 additions and 3 deletions

View File

@@ -1,14 +1,17 @@
from django.urls import path
from django.urls import path, include
from rest_framework import routers
from . import views
router = routers.DefaultRouter()
router.register(r'api-vehicle', views.VehicleViewset, basename='vehicle')
app_name = "vehicles"
urlpatterns = [
path('vhc', views.view_vhc, name='view_vhc'),
path('peremptions', views.view_peremptions, name='view_peremptions'),
path('', include(router.urls)),