#21461: Add pre_update and post_update signals -------------------------------------+------------------------------------- Reporter: loic84 | Owner: loic84 Type: New feature | Status: assigned Component: Database layer | Version: master (models, ORM) | Resolution: Severity: Normal | Triage Stage: Accepted Keywords: | Needs documentation: 0 Has patch: 1 | Patch needs improvement: 1 Needs tests: 0 | UI/UX: 0 Easy pickings: 0 | -------------------------------------+------------------------------------- Changes (by bendavis78):
* cc: bendavis78 (added) Comment: Yeah, you're right, using the dict is a messy way to solve the problem. I guess idea was to put the onus of "type" handling on the pre_save & post_save. Ideally the update() method would be agnostic regarding the payloads being passed between the signals. I think you've got the right idea with using `sender`, though I don't think the API should be prescribing those types (ie pks vs querysets). Not sure what the right answer is at this point -- maybe someone will come up with a more elegant approach. -- Ticket URL: <https://code.djangoproject.com/ticket/21461#comment:15> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/064.e0e8eb37442bd03aad6ecba4f71d367b%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.