注意对应的是put请求方式,
路由需要带上对应的更新对象的ID
example:
http://127.0.0.1:8001/api/employees/employees/2/
最后的2 即是更新的对象2
drf modelviewset 之update操作
原文:https://www.cnblogs.com/tangda/p/12155550.html