14 lines
598 B
Python
14 lines
598 B
Python
from django.urls import path, include
|
|
from rest_framework.routers import DefaultRouter
|
|
from .views import RadniNalogViewSet, PutniNalogViewSet, RadniNalogSlikaViewSet
|
|
|
|
# Kreiramo router i registriramo ViewSet za radne naloge
|
|
router = DefaultRouter()
|
|
router.register(r'radni-nalozi', RadniNalogViewSet, basename='radni-nalog')
|
|
router.register(r'putni-nalozi', PutniNalogViewSet, basename='putni-nalog')
|
|
router.register(r'radni-nalozi-slike', RadniNalogSlikaViewSet, basename='radni-nalog-slika')
|
|
|
|
urlpatterns = [
|
|
# Uključujemo sve rute koje router generira
|
|
path('', include(router.urls)),
|
|
] |