12 hours ago · Tech · hide · 0 comments

Django’s bulk_create(), bulk_update(), and update() are fast because they skip save(). That also means they skip the pre_save and post_save signals, so your receivers never fire. It’s documented for bulk_create(), bulk_update(), and update(), but nothing warns you at runtime. If a signal invalidates a cache, writes an audit log, or syncs a search index, one bulk call quietly skips that critical work. This post shows how to make those calls fail loudly instead.

No comments yet. Log in to reply on the Fediverse. Comments will appear here.