16 lines
		
	
	
		
			569 B
		
	
	
	
		
			Python
		
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			569 B
		
	
	
	
		
			Python
		
	
	
	
| from django.urls import path, include
 | |
| from rest_framework import routers
 | |
| from apps.third.views import DahuaTestView, DhCommonViewSet, XxCommonViewSet, XxTestView
 | |
| 
 | |
| 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')
 | |
| 
 | |
| 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()),
 | |
| ] |