Skip to content

Is possible to create a object and it's foreign key object with a single dictionary? #450

Answered by collerek
igormorgado asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, check save_related method.

Note that it behaves differently if you provide pk value on related model (update) or not (insert).

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@igormorgado
Comment options

@collerek
Comment options

Answer selected by igormorgado
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants