Update M2M relationship django rest framework (many=true)

前端 未结 3 1505
北海茫月
北海茫月 2021-01-06 14:10

I try to update a channel:

PUT
content [{\'url\': \'http://localhost:8000/api/movies/2\', \'title\': u\'Ariel\', \'backdrop_path\': u\'/z2QUexmccqrvw1kDMw3R8         


        
3条回答
  •  一生所求
    2021-01-06 14:45

    As you can read here, nested relations currently don't support write operations. Use HyperlinkedRelatedField instead or write a custom serializer, that implements the features you need.

提交回复
热议问题