Hallöchen! Karen Tracey writes:
> On Sun, Jul 13, 2008 at 8:20 AM, Torsten Bronger < > [EMAIL PROTECTED]> wrote: > >> While ModelForm.is_valid() finds field validation errors, it >> cannot catch errors in uniqueness or referential integrity as far >> as I can see. Thus, I have to check them in my view.py code >> separately before calling save(). >> >> If such errors are detected, I'd like to display them the same >> way as the other validation errors are displayed. Is it possible >> to inject additional errors into a form? [...] > > Ticket #7444 (http://code.djangoproject.com/ticket/7444) requests > an official API to support this; [...] I have a feeling this has > come up a few times and the answer has been "we don't need an > official API, just access _errors", [...] As far as I can see, an API is needed at least for Form-level errors. For example, if a Pizza should have at least one Topping (many-to-one relationship, I'd like to tell the user about it. But this is certainly not associated with any field. Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus Jabber ID: [EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---