Hello all,
I'm fairly new to Django and I noticed a curious behavior of
forms. I noticed that there is no simple way to test a form for a form
not being filled at all. I think it might be a semi-common use case
that you might want to simply not generate a new model instance if a
form has no information in it rather than return an error. This sort
of thing would look something like:
form.is_blank() ( analogous to form.is_valid() )
As it is, you have to mark all parts of the form as blank=True and
then scan through them. The thing is, if any of them are filled out
then I don't want blank=True on my fields, but I do want to test if
everything is blank painlessly.
I'm new at this, so there might be an idiom I don't know of or there
might be a good reason why this is a bad idea.
Thank you for reading!
-AM
--
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.