Commit 10891081 by 周田

fix:修复 url 链接问题

parent d836256a
from django.urls import re_path from django.urls import re_path
from rest_framework.routers import DefaultRouter
from . import views from . import views
router = DefaultRouter()
router.register('device_communication/communicate',
views.DeviceCommunicationParameterViewSet)
router.register('device_communication/simulate_communicate',
views.SimulateDeviceCommunicationParameterViewSet)
urlpatterns = [ urlpatterns = [
re_path(r'^device_communication/$', views.get_protocol_names), re_path(r'^device_communication/$', views.get_protocol_names),
re_path(r'^device_communication/protocol_performance/$', views.get_protocol_field_names), re_path(r'^device_communication/protocol_performance/$', views.get_protocol_field_names),
re_path(r'^device_communication/set_communication_to_devinfo_table/$', re_path(r'^device_communication/set_communication_to_devinfo_table/$',
views.set_communication_to_devinfo_table), views.set_communication_to_devinfo_table),
re_path(r'^device_communication/communicate/$',
views.DeviceCommunicationParameterViewSet.as_view(
{'get': 'list', 'post': 'create', 'delete': 'destroy'})),
re_path(r'^device_communication/simulate_communicate/$',
views.SimulateDeviceCommunicationParameterViewSet.as_view(
{'get': 'list', 'post': 'create', 'delete': 'destroy'})),
] ]
urlpatterns += router.urls
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment