Opened 16 years ago

Closed 16 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

Description

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 16 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 by das, 16 years ago

Has patch: set

by das, 16 years ago

Attachment: create_update.patch added

comment:2 by das, 16 years ago

Cc: das@… added

comment:3 by Malcolm Tredinnick, 16 years ago

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