Hello everyone,
I'm trying to run a script before saving and deleting objects in db
using django admin.
If the script fails, the action (save or delete) needs to be aborted
and we need to inform the user with a message.

In the django docs:

"...When overriding ModelAdmin.save_model()
andModelAdmin.delete_model(), your code should save/delete the object.
They are not for veto purposes, but allow you to perform extra operations..."

So using modelform I can make this work for save, but how can I make
it for delete (or delete_queryset) too?

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANbmKyu9HOckLtb%3DRX%3DfWJM6K3ccmYn%2BUsSjynv5zFATisQsww%40mail.gmail.com.

Reply via email to