router.py
621 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
from edicto import api as edicto_api
from core import api as core_api
# 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')
router.register(prefix='precio', viewset=edicto_api.PrecioViewSet)
router.register(prefix='auditoria', viewset=core_api.AuditoriaViewSet)