Re: Trouble passing keyword arg to post_save signal

2009-03-07 Thread Brandon Taylor
Hi Jacob, Thanks for the reply. My fault - I misread the post_save documentation, and thought it was able to accept **kwargs. I was able to work around the problem another way by just adding a @property to the model in question I can call from the instance passed to the signal. Brandon On Mar 7

Re: Trouble passing keyword arg to post_save signal

2009-03-07 Thread Jacob Kaplan-Moss
On Sat, Mar 7, 2009 at 11:14 PM, Brandon Taylor wrote: > When I attempt to pass a keyword arg to it: > > models.signals.post_save.connect(scrub_directory, sender=TheModel, > {'my_kwarg' : 'some_value'}) > > I get a syntax error: keyword argument appeared after a non-keyword > argument. Well, you

Trouble passing keyword arg to post_save signal

2009-03-07 Thread Brandon Taylor
Hi everyone, Syntax trouble. My post_save signal is defined as: def scrub_directory(sender, instance, **kwargs): pass When I attempt to pass a keyword arg to it: models.signals.post_save.connect(scrub_directory, sender=TheModel, {'my_kwarg' : 'some_value'}) I get a syntax error: keyword