On Tuesday, 23 September 2008 11:42:19 Daniel Roseman wrote:
> The __all__ error messages are available via form.non_field_errors().
I sent that along to the template, but it's still oddly silent.
Some code:
def clean(self):
try:
self.validate_unique()
except forms.ValidationError:
raise forms.ValidationError("Here be sea monsters!")
# If I unremark below it does raise the error, so it's running clean()
# but self.validate_unique() seems to have no effect.
# My model's field does have unique = True
# And the normal form error for a violation shows up -- the one I want
# to change.
#raise forms.ValidationError("This one will work.")
return self.cleaned_data
I'm sure I've done something daft :)
\d
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---