Re: How to pass params to a method that is invoked when a signal was send

2008-06-23 Thread mwebs

So,

I found the solution for the problem by myslef.

dispatcher.connect(makeSeoble, signal=signals.post_save,
sender=model)


... my makeSeoble method needs to look like this:

def makeSeoble(sender)

:-)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



How to pass params to a method that is invoked when a signal was send

2008-06-23 Thread mwebs

Hello,

I am trying soething like this:

dispatcher.connect(makeSeoble(model), signal=signals.post_save,
sender=model)

but I get an exception: cannot create weak reference to 'NoneType'
object
so it seems that you cannot pass a param to your "callback function"
the classical way.

when I am doing like this everything seems fine, but I cant pass the
model to makeSeoble.
dispatcher.connect(makeSeoble, signal=signals.post_save, sender=model)

Does anyone has an ideas how I can get the model in my
makeSeoble method?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---