上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 22 下一页
摘要: name: 获取项目列表接口正向用例variables:# token: "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VybmFtZSI6Inp4eV9hbmciLCJleHAiOjE2MTE0OTE4MDIsImVtYWl 阅读全文
posted @ 2021-01-23 22:37 zxy_ang 阅读(138) 评论(0) 推荐(0)
摘要: name: 登录接口正向用例# 设置【当前】使用的变量variables: username: "zxy_ang" password: "Z123456" status_code: 200 username_num: 8base_url: http://127.0.0.1:8000request: 阅读全文
posted @ 2021-01-23 22:35 zxy_ang 阅读(396) 评论(0) 推荐(0)
摘要: @action() action装饰器可以接收两个参数: methods: 声明该action对应的请求方式,列表传递 detail: 声明该action的路径是否与单一资源对应,及是否是xxx/<pk>/action方法名/ True 表示路径格式是xxx/<pk>/action方法名/ Fals 阅读全文
posted @ 2021-01-16 19:59 zxy_ang 阅读(362) 评论(0) 推荐(0)
摘要: """Django01 URL ConfigurationThe `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/topic 阅读全文
posted @ 2021-01-13 23:45 zxy_ang 阅读(509) 评论(0) 推荐(0)
摘要: 继承viewsets: 1. viewsets继承viewsetMixin,支持list(),create()等action方法; a. 可直接继承ModelViewSet(继承了mixins和GenericViewSet), 简化代码编写, ModelViewSet内部有6个接口,若不全部需要,可 阅读全文
posted @ 2021-01-12 07:16 zxy_ang 阅读(110) 评论(0) 推荐(0)
摘要: """mysite02 URL ConfigurationThe `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/topic 阅读全文
posted @ 2021-01-10 22:44 zxy_ang 阅读(115) 评论(0) 推荐(0)
摘要: import jsonfrom django.shortcuts import renderfrom django.http import JsonResponse, Http404from django.views import Viewfrom django.db.models import Q 阅读全文
posted @ 2021-01-10 10:47 zxy_ang 阅读(87) 评论(0) 推荐(0)
摘要: """Basic building blocks for generic class based views.We don't bind behaviour to http method handlers yet,which allows mixin classes to be composed i 阅读全文
posted @ 2021-01-09 21:15 zxy_ang 阅读(125) 评论(0) 推荐(0)
摘要: 1.功能(继承APIView):认证,授权,限流 2. 请求ququest,返回response对象 3. 可进行过滤,排序,分页 4. Mixins:将一些接口公共方法抽出,放入此类中 阅读全文
posted @ 2021-01-09 20:35 zxy_ang 阅读(81) 评论(0) 推荐(0)
摘要: from .models import Projectsfrom rest_framework.generics import GenericAPIViewfrom rest_framework.response import Responsefrom rest_framework import s 阅读全文
posted @ 2021-01-09 20:24 zxy_ang 阅读(99) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 22 下一页