sbt-idp/cope2n-api/fwd_api/api_router.py

22 lines
782 B
Python
Executable File

from django.conf import settings
from rest_framework.routers import DefaultRouter, SimpleRouter
from fwd_api.api.ctel_view import CtelViewSet
from fwd_api.api.accuracy_view import AccuracyViewSet
from fwd_api.api.ctel_user_view import CtelUserViewSet
from fwd_api.api.ctel_template_view import CtelTemplateViewSet
from fwd_api.api.semi_auto_correction import SemiAutoCorrectionViewSet
if settings.DEBUG:
router = DefaultRouter()
else:
router = SimpleRouter()
router.register("automation", SemiAutoCorrectionViewSet, basename="SemiAutoAPI")
router.register("ctel", CtelViewSet, basename="CtelAPI")
router.register("ctel", CtelUserViewSet, basename="CtelUserAPI")
router.register("ctel", AccuracyViewSet, basename="AccuracyAPI")
app_name = "api"
urlpatterns = router.urls