factory/apps/third/urls.py

19 lines
753 B
Python
Executable File

from django.urls import path, include
from rest_framework import routers
from apps.third.views import DahuaTestView, DhCommonViewSet, SpTestView, XxCommonViewSet, XxTestView
from apps.third.views_d import TDeviceViewSet
API_BASE_URL = 'api/third/'
HTML_BASE_URL = 'third/'
router = routers.DefaultRouter()
router.register('xunxi', XxCommonViewSet, basename='api_xunxi')
router.register('dahua', DhCommonViewSet, basename='api_dahua')
router.register('tdevice', TDeviceViewSet, basename='tdevice')
urlpatterns = [
path(API_BASE_URL, include(router.urls)),
path(API_BASE_URL + 'dahua/test/', DahuaTestView.as_view()),
path(API_BASE_URL + 'xunxi/test/', XxTestView.as_view()),
path(API_BASE_URL + 'speaker/test/', SpTestView.as_view())
]