Commit 4d7c889b by 周田

doc:注释

parent 57b653a3
......@@ -7,7 +7,9 @@ from protocol_version_manage.models import (AllProtocolVersion, AllProtocolDefin
@api_view(['GET'])
def get_protocol_names(request):
"""
获取所有协议,并返回
"""
protocol_names = AllProtocolVersion.objects.all()
res_data = ([{'value': protocol_name.protocol_name, 'label': protocol_name.protocol_name}
for protocol_name in protocol_names])
......@@ -17,6 +19,9 @@ def get_protocol_names(request):
@api_view(['POST'])
def get_protocol_field_names(request):
"""
获取指定协议下的指令集
"""
protocol_name = request.data.get('protocol_name')
if protocol_name is None or protocol_name == '':
return Response(status=status.HTTP_400_BAD_REQUEST)
......
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