router.py
680 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, ComprobanteViewSets
from edicto import api as edicto_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='pago', viewset=edicto_api.PagoViewSets)
router.register(r'comprobante', ComprobanteViewSets, basename='comprobante')