Pardon me, it's early. What I mean to do is pass new data to the form
to be saved to the object.
If I create a new object with the ModelForm then it's OK to pass the
data to the form in a dictionary, i.e.
f = ArticleForm({'title':'Old news'})
In [60]: f.is_valid()
Out[60]: True
However, if I want to change an existing object it seems I must use
request.POST, i.e.
f = ArticleForm(request.POST, instance=a)
Because,
f = ArticleForm({'title':'Old news'}, instance=a)
In [64]: f.is_valid()
Out[64]: False
How can I pass a dictionary rather than request.POST to change an
existing object?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---