router.py
393 Bytes
from rest_framework import routers
from organismo import api as organismo_api
from evento import api as evento_api
# Define routes
router = routers.DefaultRouter()
router.register(prefix='organismo', viewset=organismo_api.OrganismoViewSets)
router.register(prefix='dependencia', viewset=organismo_api.DependenciaViewSets)
router.register(prefix='evento', viewset=evento_api.EventoViewSets)