Friday, September 30, 2011

"Unidentified Errors" message instead of ValidationError

Hey there.

OK, trying to add a clean method to a ModelForm in Django.  I'm adding a simple raise statement just to see if it works, and instead of my message, I get "Unidentified Errors.  Please notify..."

Here's my (simple) test:


class ConfigurationForm(forms.ModelForm):
    ...

    def clean(self):
        cleaned_data =self.cleaned_data
        typeid=cleaned_data.get("typeid")
        value =cleaned_data.get("value") 

        if value and typeid:
           raiseforms.ValidationError("this is the error")


I couldn't even find a reference to "Unidentified Errors" anywhere in the django code base.  Thanks in advance for your help.

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment