20 lines
820 B
Python
Executable File
20 lines
820 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, TlogViewSet
|
|
|
|
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')
|
|
router.register('tlog', TlogViewSet, basename='tlog')
|
|
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())
|
|
]
|