Re: adding Many-to-one objects in m-r

2006-04-24 Thread Russell Keith-Magee
On 4/25/06, Adam <[EMAIL PROTECTED]> wrote: > > I searched the ticket system and discovered that the first version > works as: > > reporter_obj.article_set.create(headline='Foo') > > Was it intended to have two different methods for this? "add" for using > a preexisting object and "create" for usi

adding Many-to-one objects in m-r

2006-04-24 Thread Adam
I just started porting an app over to magic-removal and ran across this. The documentation (http://code.djangoproject.com/wiki/RemovingTheMagic#Descriptorfields) says that you can add a ForeignKey related object with either of: reporter_obj.article_set.add(headline='Foo') reporter_obj.article_set