Reputation: 60
I want to update multiple attributes of multiple model instances of same model. It should update the instance based on the primary key.
Upvotes: 0
Views: 169
Reputation: 31
Maybe the best solution for that porpuse is using update function from django.
ModelName.objects.all().update(**new_data)
Upvotes: 1