bulk_update: add **exclude** arg

35 views
Skip to first unread message

Mohammad Etemaddar

unread,
Jan 18, 2019, 2:49:15 PM1/18/19
to Django developers (Contributions to Django itself)
Dear Django developers,
Thank you very much for great work and team-work on our beloved Django.

I suddenly saw the new great feature bulk_update for models and so updated to the dev branch.
As other similar situations like forms, we have exclude argument for lazy programmers.

Thank you,
Mohammad Etemaddar

Tom Forbes

unread,
Jan 18, 2019, 2:57:08 PM1/18/19
to django-d...@googlegroups.com
Hey Mohammad,
Thanks for your suggestion. I considered this while implementing bulk update but I decided against it. 

In my opinion you should be very explicit about the fields you wish to update, due to the way that bulk update works it can generate very large and expensive queries if a lot of columns are updated, so it's better to be upfront about what you want to update rather than potentially having s situation where adding a large text field suddenly causes performance issues (or even database errors) anywhere you use bulk update with that model.

Tom

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/9cbf3c99-70b5-49d4-a141-d317652ff66a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages