On May 13, 5:17 pm, zweb <traderash...@gmail.com> wrote:
> I am doing this
>
>  form = ContactForm(request.POST) # A form bound to the POST data
>  if form.is_valid(): # All validation rules pass
>
> As clean is called by is_valid() and at this point form in bound to
> POST data, I cannot use self.instance unless I do this
>
>         form = ContactForm(request.POST, instance= contact)
>
> Any downside to doing this ... as I have done either form =
> ContactForm(request.POST) or  form = ContactForm( instance= contact)
> but never both together.

No downside, this is what you should be doing to update an existing
instance.
--
DR.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to