Re: Problems with signals accessing kwargs

2008-09-15 Thread Benjamin Buch
Thanks! I've got it working now: def mail_on_create_intro(sender, instance, created, **kwargs): if created: email_body = 'A new Intro at' + instance.url email_subject = 'New Intro' else: email_body = 'An intro has changed at' + instance.url email_s

Re: Problems with signals accessing kwargs

2008-09-14 Thread Erik Allik
Or: def mail_on_create_intro(sender, created=None, **kwargs): if created: email_body = 'A new intro at ' + instance.url email_subject = 'New intro' else: email_body = 'An intro has changed at ' + instance.url email_subject = 'Changed Intro' mail_

Re: Problems with signals accessing kwargs

2008-09-14 Thread globophobe
Try: if 'created' in kwargs: if kwargs['created']: # Send email --~--~-~--~~~---~--~~ 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@googlegroup