Re: Using ManytoManyField's in signals

2008-09-03 Thread Rajesh Dhawan
> > for s in site: >     ti.site.add(s) > > almost worked.  I got an error that the ManyRelatedManager wasn't > iterable.  So I did a little research and found that > > for s in site.all(): >     ti.site.add(s) > > that works because the query set that it builds is iterable. Yes. Sorry, I should

Re: Using ManytoManyField's in signals

2008-09-03 Thread nek4life
On Sep 3, 4:08 pm, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > On Sep 3, 3:59 pm, nek4life <[EMAIL PROTECTED]> wrote: > > > I'm using Django Beta 2 > > If, instead of top-posting, you bottom-post your responses, it's > easier for people to see which questions you're responding to. > > > > > > >

Re: Using ManytoManyField's in signals

2008-09-03 Thread Rajesh Dhawan
On Sep 3, 3:59 pm, nek4life <[EMAIL PROTECTED]> wrote: > I'm using Django Beta 2 If, instead of top-posting, you bottom-post your responses, it's easier for people to see which questions you're responding to. > > Here is my article model > > from django.db import models > from django.contrib.si

Re: Using ManytoManyField's in signals

2008-09-03 Thread nek4life
I'm using Django Beta 2 This is my post data bodyu'body' status u'2' allow_comments u'on' _save u'Save' leadu'lead' author u'1' title u'Test Post' siteu'2' publish_1 u'15:04:22' publish_0 u'2008-09-03' lead

Re: Using ManytoManyField's in signals

2008-09-03 Thread Rajesh Dhawan
> Seems like I'm headed in the right direction, I made the changes you > suggested but now I'm getting a warning. > > > Exception Type: Warning at /admin/posts/article/add/ > Exception Value: Incorrect integer value: > ' 0xfd8d50>' for column 'site_id' at row 1 > > Not sure what's going on... I

Re: Using ManytoManyField's in signals

2008-09-03 Thread Rajesh Dhawan
Hi, > from django.db import models > from django.contrib.contenttypes import generic > from django.template.loader import render_to_string > from django.db.models import signals > from django.contrib.contenttypes.models import ContentType > from django.dispatch import dispatcher > from django.con

Re: Using ManytoManyField's in signals

2008-09-03 Thread nek4life
Thanks Rajesh, Seems like I'm headed in the right direction, I made the changes you suggested but now I'm getting a warning. Environment: Request Method: POST Request URL: http://localhost:8000/admin/posts/article/add/ Django Version: 1.0-beta_2-SVN-unknown Python Version: 2.5.2 Installed Appli