rest-framework基本组件—主要看频率

  添加节流 自定义节流的方法  限制60s内只能访问3次 (1)API文件夹下面新建throttle.py,代码如下: # utils/throttle.py from rest_framework.throttling import BaseThrottle import time VISIT_RECORD = {} #保存访问记录 class VisitThrottle(BaseTh
相关文章
相关标签/搜索