from django.urls import path, include from rest_framework.routers import DefaultRouter from .views import ( ProductViewSet, EmployeeViewSet, PositionViewSet, StorageLocationViewSet, ContractorViewSet, SupplyContractViewSet, TruckViewSet ) router = DefaultRouter() router.register(r'products', ProductViewSet) router.register(r'employees', EmployeeViewSet) router.register(r'positions', PositionViewSet) router.register(r'storage-locations', StorageLocationViewSet) router.register(r'contractors', ContractorViewSet) router.register(r'supply-contracts', SupplyContractViewSet) router.register(r'trucks', TruckViewSet) urlpatterns = [ path('api/', include(router.urls)), ]