When are create and update called in djangorestframework serializer?

前端 未结 3 1611
死守一世寂寞
死守一世寂寞 2021-01-30 09:12

I\'m currently implementing djangorestframework for my app RESTful API. After playing around with it, I still do not clearly understand what .create(self, validated_data)<

3条回答
  •  一生所求
    2021-01-30 09:44

    In the rest-api design create, read, update and delete is a standard. There is not quite big difference in create and update.

    Please refer to this and

    see create() method will create an item.

    and

    update() method need to specify which item to be updated.

提交回复
热议问题