router.py 412 Bytes
from rest_framework import routers

from organismo import api as organismo_api
from usuario import api as usuario_api
from edicto.api import EdictoViewSet
# Define routes
router = routers.DefaultRouter()

router.register(prefix='usuario', viewset=usuario_api.UsuarioViewSet)
router.register(prefix='organismo', viewset=organismo_api.OrganismoViewSet)
router.register(r'edicto', EdictoViewSet, basename='edicto')