摘要: views.py 重写 list方法 阅读全文
posted @ 2023-06-13 19:46 tslam 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 鼠标点击ValidationError(), 再点击PyCharm右侧对应两个按钮, 找见源码 如下 结论: 你可以直接传dict 或 list内容 阅读全文
posted @ 2023-06-13 16:59 tslam 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 分析: 我们返回给前端的是Response对象, 要给Response加减内容,首先得找见它. 所以步骤是 1.1 找见Response 1.2 给Response添加/减少/改变东西, 返回新的Response 1.1 返回Response 位置 -> 五个视图扩展类里 from rest_fra 阅读全文
posted @ 2023-06-13 15:54 tslam 阅读(30) 评论(0) 推荐(0) 编辑