lsl's recent timeline updates
lsl

lsl

V2EX member #91787, joined on 2015-01-14 15:30:52 +08:00
lsl's recent replies
Mar 29, 2018
Replied to a topic by lsl 问与答 Django DRF model 多对多手动指定,表序列化问题.
感谢回复,Django Restful Framework 目前学的还不够深,我就是奇怪为什么 ManyToManyField 自动生成的表,同样是用 ModelSerializer 序列化,"members"该字段属性就是"read_only": false;而手动指定中间表序列化"read_only": true. 官方文档中说的"By default, relational fields that target a ManyToManyField with a through model specified are set to read-only. "是不是意味手动指定中间表那么该字段属性就是"read_only": true.
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2358 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 14ms · UTC 10:32 · PVG 18:32 · LAX 03:32 · JFK 06:32
♥ Do have faith in what you're doing.