from django.urls import path, include
from rest_framework.routers import DefaultRouter
from .views import DogadajViewSet, MojRasporedView

# Kreiramo router i registriramo naš ViewSet za kalendarske događaje
router = DefaultRouter()
router.register(r'dogadaji', DogadajViewSet, basename='dogadaji')

# Definiramo URL obrasce
urlpatterns = [
    # Sve CRUD rute koje router generira (npr. /kalendar/dogadaji/)
    path('', include(router.urls)),
    
    # Specijalna ruta za "današnji raspored" servisera
    # Dostupna na: /kalendar/moj-raspored/
    path('moj-raspored/', MojRasporedView.as_view(), name='moj-raspored'),
]