Unless your model has defined columns with unique_together, and the
form attempts to save fields which violate the constraint. In that
case, an integrity exception is raised because ModelForm does not
currently valid it. You must perform this validation yourself.
On Apr 19, 10:20 pm, Malcolm
On Sat, 2008-04-19 at 13:18 -0700, John wrote:
> If you have code like this using a form that subclasses ModelForm:
>
> if request.method == 'POST':
> form = MyModelForm(request.POST, instance=some_instance)
> form.is_valid():
>form.save()
>
> Does MyModelForm first fill it's fi
If you have code like this using a form that subclasses ModelForm:
if request.method == 'POST':
form = MyModelForm(request.POST, instance=some_instance)
form.is_valid():
form.save()
Does MyModelForm first fill it's fields with data from some_instance,
and then override with the da
3 matches
Mail list logo