阅读背景:

Django Rest框架HyperLinkedRelatedField:允许id而不是post请求的url

来源:互联网 

I would like to allow a HyperLinkRelatedField to accept just an id instead of requiring a hyperlink to create a new instance of an object, but for get requests I would like to return the hyperlink not just an id but it appears to be either one or the other. Is this possible?I would like to allow a HyperLinkRelatedField t




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: