Are there any documents about this? I could not dig.
I have a custom one ModelFormfor creating articles. Whenever I use this form, I pass in an instance articleto automatically set the author:
article = Article(author=req.user)
form = ArticleForm(req.POST, instance=article)
How do I access this variable instance/ articlefrom the inside form.save()?
Is there anything else I need to know when writing this method? Or just need to be returned articleand is that pretty much?
source
share