You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
if I define a model called CustomModel and I attach attach a pre_save signal to it. Is there any way to have that signal be called any time model that extends CustomModel is being saved has that method saved.
I know i could do this by overriding the save method on CustomeModel but I was wondering if there is any way to do it with signals.
Thanks, Vitaly Babiy
Alex Koshelev
unread,
Nov 7, 2008, 12:19:10 PM11/7/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
Try to connection handler without `sender` specified. And filter needed models inside it.
def my_handler(sender, **kwargs): if not isinstance(sender, CustomModel): return
signals.pre_save.connect(my_handler)
Vitaly Babiy
unread,
Nov 7, 2008, 12:50:47 PM11/7/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message