piccolo_admin icon indicating copy to clipboard operation
piccolo_admin copied to clipboard

Post Edit Hooks

Open cheesycod opened this issue 3 years ago • 3 comments

Sorry for all the issues, but here’s another feature that would be nice. Make it so you can register a callback function for whenever an edit, deletion or addition to a table happens

cheesycod avatar Jun 05 '21 06:06 cheesycod

Good idea - I think this would be a nice feature.

dantownsend avatar Jun 08 '21 09:06 dantownsend

Current status

We now have pre-edit hooks.

TableConfig accepts a hooks argument:

https://piccolo-admin.readthedocs.io/en/latest/table_config/index.html#source

We only have a pre-save hook at the moment. Need to add a post-save hook still.

dantownsend avatar Jul 25 '22 12:07 dantownsend

@dantownsend any plans to add the post_save / post_udpate hooks anytime soon ? It would greatly help for my use case, which is to create a Scan instance, launch a Celery task and pass it the Scan id so that the Celery task can update it with results later.

ocervell avatar Feb 02 '23 10:02 ocervell