Opened 15 years ago

Closed 15 years ago

#12184 closed (wontfix)

Post/Pre-Save signal on queryset update

Reported by: Bernhard <bernhardv@…> Owned by: nobody
Component: Database layer (models, ORM) Version: 1.1
Severity: Keywords: queryset, signals, update
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Django is sending the pre/post_delete signals if you are using the queryset.delete() method, but shouldn't it then also send pre/post_save on queryset.update()?

Change History (2)

comment:1 by Bernhard <bernhardv@…>, 15 years ago

comment:2 by Russell Keith-Magee, 15 years ago

Resolution: wontfix
Status: newclosed

I'm not sure it's practical to do so. We're able to send a signal to every object in a delete because we are iterating over every object. However, we don't (currently) iterate over every object in an update - it's an atomic SQL UPDATE call. In order to send a signal on update, we would need to also issue a SELECT call, and iterate over the result of that select twice. This would essentially eliminate any processing benefit from making an update query.

Marking wontfix. Please raise on django-dev if you disagree with my reasoning.

Note: See TracTickets for help on using tickets.
Back to Top