Hi everyone,

I'm trying to use a view with multiple forms under Django 1.2.1. I'm
puzzled that the prefix parameter seems to screw up validation. Here's
a test case:


>>> from django import forms
>>>
>>> class MyForm(forms.Form):
>>>     field1 = forms.IntegerField(required=False)
>>>     field2 = forms.IntegerField()
>>>
>>> f1 = MyForm(data={'field1': 1, 'field2': 2})
>>> f2 = MyForm(data={'field1': 1, 'field2': 2}, prefix='p')
>>>
>>> f1.is_valid()
True

>>> f2.is_valid()
False


Can anyone explain why these are different?

Cheers,
-- Ed

-- 
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