示例#1
0
文件: views.py 项目: sdgdsffdsfff/api
def interface_show_view(request):
    data = {}
    data["auth"] = utils.check_auth(request)
    data["urlHost"] = data_utils.get_url_host_list()
    data["api"] = data_utils.get_api(request.GET.get("id"))
    data["structure"] = data_utils.get_data_structure()
    data["mob_version"] = data_utils.get_mob_version_list()
    return render(request, 'interface_show.html', {"data": data})
示例#2
0
def interface_show_view(request):
    data = {}
    data["auth"] = utils.check_auth(request)
    data["urlHost"] = data_utils.get_url_host_list()
    data["api"] = data_utils.get_api(request.GET.get("id"))
    data["structure"] = data_utils.get_data_structure()
    data["mob_version"] = data_utils.get_mob_version_list()
    return render(request, 'interface_show.html', {"data": data})
示例#3
0
文件: views.py 项目: sdgdsffdsfff/api
def save_data_structure_view(request):
    if request.method == "POST":
        ret = data_utils.save_data_structure(request)
        return public.success_result_http(ret)
    else:
        data = {}
        data["structure"] = data_utils.get_data_structure()
        data["current"] = data_utils.get_structure_dict(request.GET.get("id"))
        return render(request, 'edit_structure.html', {"data": data})
示例#4
0
def save_data_structure_view(request):
    if request.method == "POST":
        ret = data_utils.save_data_structure(request)
        return public.success_result_http(ret)
    else:
        data = {}
        data["structure"] = data_utils.get_data_structure()
        data["current"] = data_utils.get_structure_dict(request.GET.get("id"))
        return render(request, 'edit_structure.html', {"data": data})
示例#5
0
文件: views.py 项目: sdgdsffdsfff/api
def add_interface_view(request):
    if request.method == "POST":
        ret = data_utils.save_api(request)
        return public.success_result_http(ret)
    else:
        data = {}
        data["auth"] = utils.check_auth(request)
        data["work_id"] = request.GET.get("work_id", "")
        data["group_id"] = request.GET.get("group_id", "")
        data["group"] = data_utils.get_api_group_list({"work_id": data["work_id"]})
        data["work"] = data_utils.get_api_work()
        data["urlHost"] = data_utils.get_url_host_list()
        data["structure"] = data_utils.get_data_structure()
        data["api_tag"] = data_utils.get_api_tag_list()
        data["api"] = data_utils.get_api(request.GET.get("id"))
        return render(request, 'add_interface.html', {"data": data})
示例#6
0
def add_interface_view(request):
    if request.method == "POST":
        ret = data_utils.save_api(request)
        return public.success_result_http(ret)
    else:
        data = {}
        data["auth"] = utils.check_auth(request)
        data["work_id"] = request.GET.get("work_id", "")
        data["group_id"] = request.GET.get("group_id", "")
        data["group"] = data_utils.get_api_group_list(
            {"work_id": data["work_id"]})
        data["work"] = data_utils.get_api_work()
        data["urlHost"] = data_utils.get_url_host_list()
        data["structure"] = data_utils.get_data_structure()
        data["api_tag"] = data_utils.get_api_tag_list()
        data["api"] = data_utils.get_api(request.GET.get("id"))
        return render(request, 'add_interface.html', {"data": data})
示例#7
0
文件: views.py 项目: sdgdsffdsfff/api
def get_data_structure_view(request):
    data = {}
    data["structure"] = data_utils.get_data_structure()
    return render(request, 'data_structure.html', {"data": data})
示例#8
0
def get_data_structure_view(request):
    data = {}
    data["structure"] = data_utils.get_data_structure()
    return render(request, 'data_structure.html', {"data": data})