摘要:
第一步:进入settings 第二步:自定义或改写默认代码 阅读全文
posted @ 2023-12-26 20:43
wellplayed
阅读(82)
评论(0)
推荐(0)
摘要:
认证组件的书写 例:书写登录认证(LoginAuth) 第一步:新建一个py文件(以auth为例) 第二步:书写认证类,并继承BaseAuthentication # 首先导入模块 from rest_framework.authentication import BaseAuthenticatio 阅读全文
posted @ 2023-12-26 16:25
wellplayed
阅读(16)
评论(0)
推荐(0)
摘要:
自动生成路由 第一步:导入 from rest_framework.routers import SimpleRouter, DefaultRouter 第二步:实例化 router = SimpleRouter() 第三步:注册路径(以BookView为例) router.register('bo 阅读全文
posted @ 2023-12-26 16:12
wellplayed
阅读(20)
评论(0)
推荐(0)

浙公网安备 33010602011771号