gontran -

Thanks.

However, I tried the sample code in your link, and I don't think it
will work. Returning a string from the overridden save() method
prevents the record from being saved to the database, but by the time
the save() method is invoked, my ModelForm (and consequently, I
presume, the underlying Model) has already been tested as valid. The
Restaurant isn't saved, but the form isn't redisplayed and no error
message is shown, and code execution proceeds as if the form were
valid (because it *is* valid; it just wasn't saved).

I think I need to override the model validation instead. Perhaps I
need to override Model.clean_fields()?

-- 
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