The update operation drf modelviewset

 

 Note that put request corresponding manner,

Routing update need to bring the object corresponding to the ID

example:

http://127.0.0.1:8001/api/employees/employees/2/

The last 2 that is the object of update 2 

Guess you like

Origin www.cnblogs.com/tangda/p/12155550.html