用tastypi过滤ToOneField

2024-06-16 11:47:42 发布

您现在位置:Python中文网/ 问答频道 /正文

我试着用OneToField字段过滤resource。在

我希望通过此url获得任务安全密钥的收藏夹相关信息:
/收藏夹/api/all/?任务安全密钥=sdsd900kljhiu987bbhU

和tastypie return:

{"error": "The 'secure_key' field does not allow filtering."}

以下是我的档案:

最喜欢的/api.py文件在

^{pr2}$

任务/api.py文件在

^{3}$

我的错误在哪里?在


Tags: 文件thepyapi信息urlreturn密钥