> > 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
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.
>
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,
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',
4 matches
Mail list logo