摘要: 基本组件的使用 -restful规范 -序列化组件 -APIView源码分析 -Response源码分析 -source用法 -定制字段的两种方式 -反序列化的保存与修改 -ModelSerializer用法 -请求与响应 -状态码 -GenericAPIView用法 -路由组件 -认证组件 -权限 阅读全文
posted @ 2023-11-20 21:03 wellplayed 阅读(14) 评论(1) 推荐(2) 编辑
摘要: 一、准备工作 首先需要一张数据库表(以Book表为例) 在models内书写: class Book(models.Model): name = models.CharField(max_length=32) price = models.BigIntegerField() url: path('b 阅读全文
posted @ 2023-11-20 20:57 wellplayed 阅读(11) 评论(0) 推荐(0) 编辑