Opened 13 years ago

Closed 13 years ago

#9094 closed (wontfix)

Invoke method after create_update.(create|update|delete)_object methods

Reported by: das Owned by: nobody
Component: Generic views Version: 1.0
Severity: Keywords:
Cc: das@… Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Sometimes it's useful to be able to invoke a method after the (create|update|delete)_object method saved or deleted your object. For example, to create a log message.

The attached patch adds a post_save_action/post_delete_action parameter to create_object, update_object and delete_object, which take a method object. After saving or deleting the object, the method is invoked before redirecting. Changes to documentation are included.

Attachments (1)

create_update.patch (5.1 KB) - added by das 13 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 Changed 13 years ago by das

Has patch: set

Changed 13 years ago by das

Attachment: create_update.patch added

comment:2 Changed 13 years ago by das

Cc: das@… added

comment:3 Changed 13 years ago by Malcolm Tredinnick

Resolution: wontfix
Status: newclosed

This seems to be making things more and more complicated in generic view land. It's getting to the point that they're effectively unusable because of the many, many parameters that form their own little language of configuration.

You can already achieve this result with a signal handler on the post_save and post_delete signals for the appropriate models. So let's not add another way to do the same thing.

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