I have a search form that is used by a view to search for results and
then redirect to display them one at a time. If my search doesn't find
any objects matching the criteria, I'd like to display a message
saying so.

It seems natural to add this error to the search form and redisplay it
since it already displays error with the search.

Is there an easy way to do this, or should I be doing something else
because a failed database query is not a form error?

I've been trying to do this:
form.non_field_errors().append(forms.ValidationError("No roblems found
matching that criteria"))
but it doesn't work (non_field_errors() is not well documented).

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@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