TITLE should be: Saving form into 2 models can’t edit title…
Hi
I’ve been searching forums, but more topics on getting data from multiple models, can’t find how to save data from 1 form (text, integers and file) into 2 models.
I have 2 models: Users and Docs
Users:
[color="#0000FF"]
id
name
id_doc
[/color]
Docs:
[color="#006400"]
id
content
[/color]
Users.id_doc=Docs.id
On the create form of model User I have FileField which I want to save to model Docs, rest of the data (text, integers) will be saved to ::self model User. How can I save simultaneously User data to Users model and corresponding doc to Docs table/model?