Эх сурвалжийг харах

新增网关子设备相关接口

locky 3 жил өмнө
parent
commit
427302e78d

+ 8 - 5
Ansjer/server_urls/loocam_url.py

@@ -6,12 +6,15 @@
 @Email   : zhangdongming@asj6.wecom.work
 @Software: PyCharm
 """
-from django.conf.urls import url
+from django.urls import re_path
 
-from SensorGateway import EquipmentFamilyController, GatewayFamilyRoomController, GatewayFamilyMemberController
+from SensorGateway import EquipmentFamilyController, GatewayFamilyRoomController, GatewayFamilyMemberController, \
+    SubDeviceController
 
 urlpatterns = [
-    url(r'^sensor/gateway/(?P<operation>.*)$', EquipmentFamilyController.EquipmentFamilyView.as_view()),
-    url(r'^gateway/family/room/(?P<operation>.*)$', GatewayFamilyRoomController.GatewayFamilyRoomView.as_view()),
-    url(r'^gateway/family/member/(?P<operation>.*)$', GatewayFamilyMemberController.GatewayFamilyMemberView.as_view()),
+    re_path(r'^sensor/gateway/(?P<operation>.*)$', EquipmentFamilyController.EquipmentFamilyView.as_view()),
+    re_path(r'^gateway/family/room/(?P<operation>.*)$', GatewayFamilyRoomController.GatewayFamilyRoomView.as_view()),
+    re_path(r'^gateway/family/member/(?P<operation>.*)$',
+            GatewayFamilyMemberController.GatewayFamilyMemberView.as_view()),
+    re_path(r'^gateway/subdevice/(?P<operation>.*)$', SubDeviceController.GatewaySubDeviceView.as_view()),
 ]