Tastypie嵌套资源URI

时间:2013-01-11 08:50:45

标签: python django api tastypie

我正在创建一个API,我希望POSTGET来自父对象的子对象。例如:

  • GET challenge/1/solutions = [Listof Solutions] filtered with challenge_id=1
  • GET challenge/1/solution/1 = Solution with id=1 filtered with challenge_id=1
  • POST challenge/1/solution = Add to Solution with challenge_id=1

solution个网址仅返回用户提交的解决方案。上面的URL用于访问每个挑战的解决方案列表。

我需要这个解决方案来应用于多个子对象。

1 个答案:

答案 0 :(得分:0)

我使用delicious-cake代替