Hello everyone,
If you take a form like this:
class EmailForm(forms.Form):
email = froms.EmailField()
>>> form = EmailForm()
>>> form.is_bound
False
>>> form = EmailForm({})
>>> form.is_bound
True
That works great
Now lets try it with a ModelForm
class UserForm(forms.ModelForm):
class Meta:
model=User
fields= ('first_name',)
>>> form = UserForm()
>>> form.is_bound
False # this is good
>>> form = UserForm({})
>>> form.is_bound
False # this should be true
I am not sure why when you give a model form data it does not become bound.
Is this a bug?
Vitaly Babiy
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---