I want to update a Django model instance using ajax PUT request and a Django REST API . What I want to do is to send only the values that will be updated within the PUT request. I used a Jquery DataForm object. But I get an error saying that there are required fields that can not be empty. Is there a way to indicate that those fields should keep their old values ? Thank you for your help.
Asked
Active
Viewed 91 times
1 Answers
0
If you're using Django REST Framework then you can allow partial updates in model instances.
http://www.django-rest-framework.org/api-guide/serializers/#partial-updates
Hope this helps.

Aakash Rayate
- 934
- 7
- 17