Reputation: 1
how to update multiple fields via
Model.objects.bulk_create(list)
I try it
Model.objects.bulk_create(list).update(startD=startD, endD=endD)
but error show 'list' object has no attribute 'update'
Upvotes: 0
Views: 147
Reputation: 11
you can try this:
Model.objects.update(anythings)
this code will update all of the table from this model
but if you want to update one of the data table of this model try this code:
Model.objects.filter(limit_the_data_table).update(anythings)
Upvotes: 1