01 2021 档案

摘要:全局匿名和用户节流: # 限流 'DEFAULT_THROTTLE_CLASSES': [ 'rest_framework.throttling.AnonRateThrottle', 'rest_framework.throttling.UserRateThrottle' ], 'DEFAULT_T 阅读全文
posted @ 2021-01-29 11:26 不带R的墨菲特 阅读(139) 评论(0) 推荐(0) 编辑
摘要:import logging from rest_framework.views import exception_handler as rest_handler from rest_framework.response import Response from django.db import D 阅读全文
posted @ 2021-01-26 14:18 不带R的墨菲特 阅读(569) 评论(2) 推荐(0) 编辑
摘要:3.1 Djang 对 request 的处理 以本地开发为例,当浏览器发起一次请求时,Django 中的 wsgi 创建一个 WSGIHandler 对象处理请求。在WSGIHandler 对象中初始化环境变量,如果没有异常,则调用 self.get_response(request) 函数处理请 阅读全文
posted @ 2021-01-25 20:34 不带R的墨菲特 阅读(950) 评论(1) 推荐(0) 编辑
摘要:from django.utils.decorators import method_decoratorfrom drf_yasg.utils import swagger_auto_schemafrom drf_yasg import openapi class BatchTestSuiteVie 阅读全文
posted @ 2021-01-25 11:41 不带R的墨菲特 阅读(3467) 评论(4) 推荐(0) 编辑

点击右上角即可分享
微信分享提示