Re: Problem with contrib.comments and signals: instance is not defined

2008-10-24 Thread Eric Abrahamsen
On Oct 24, 2008, at 12:23 PM, Brandon Taylor wrote: > > Hi everyone, > > I'm using Django 1.0, and attempting to do some comment moderation > with Akismet. When I try to wire up a pre_save signal, I'm getting an > error saying 'instance' is not defined. Here is my code: You might also consider

Re: Problem with contrib.comments and signals: instance is not defined

2008-10-23 Thread Malcolm Tredinnick
On Thu, 2008-10-23 at 21:23 -0700, Brandon Taylor wrote: > Hi everyone, > > I'm using Django 1.0, and attempting to do some comment moderation > with Akismet. When I try to wire up a pre_save signal, I'm getting an > error saying 'instance' is not defined. Here is my code: > > def

Problem with contrib.comments and signals: instance is not defined

2008-10-23 Thread Brandon Taylor
Hi everyone, I'm using Django 1.0, and attempting to do some comment moderation with Akismet. When I try to wire up a pre_save signal, I'm getting an error saying 'instance' is not defined. Here is my code: def moderate_comment(sender, **kwargs): if not instance.id: # <-- instance is not