Re: pass related_name-s into Model.objects.create()?

2010-05-18 Thread Phlip
> > But what about 'ForeignKey's? May we pass their 'remote_name's in with > > the kwargs? > > Foreign Keys - yes. Reverse Foreign Keys - no. Point: All kwargs takes is the fields on this object. > In the case of a foreign key, just pass in the object instance that > you want your object to be

Re: pass related_name-s into Model.objects.create()?

2010-05-18 Thread Russell Keith-Magee
On Tue, May 18, 2010 at 12:45 PM, Phlip wrote: > Djangoists: > > The documentation for Model.objects.create(**kwargs) does not define > kwargs. It just sez "kwargs". > > I think all of our experiences would bear out "kwargs" may at least be > the model's fields. Correct. >

pass related_name-s into Model.objects.create()?

2010-05-17 Thread Phlip
Djangoists: The documentation for Model.objects.create(**kwargs) does not define kwargs. It just sez "kwargs". I think all of our experiences would bear out "kwargs" may at least be the model's fields. But what about 'ForeignKey's? May we pass their 'remote_name's in with the kwargs? If not,

pass related_name-s into Model.objects.create()?

2010-05-17 Thread Phlip
Djangoids: The documentation for Model.objects.create(**kwargs) just sez "**kwargs". What goes in the kwargs? Anything beside the obvious - the scalar members of the model? How about one-to-many relationships? Can I do this: Author.objects.create( name='Cromskey',