Re: Injecting error messages into ModelForm

2008-07-13 Thread Karen Tracey
On Mon, Jul 14, 2008 at 12:33 AM, Torsten Bronger < [EMAIL PROTECTED]> wrote: > > 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

Re: Injecting error messages into ModelForm

2008-07-13 Thread Torsten Bronger
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

Re: Injecting error messages into ModelForm

2008-07-13 Thread Karen Tracey
On Sun, Jul 13, 2008 at 8:20 AM, Torsten Bronger < [EMAIL PROTECTED]> wrote: > > Hallöchen! > > 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

Re: Injecting error messages into ModelForm

2008-07-13 Thread Torsten Bronger
Hallöchen! Andrew Ingram writes: > ModelForm is really just a convenient subclass of Form, so if you > want additional validation methods you just have to > implement/override the clean methods like you would with a normal > form. The problem is that at the time the relational integrity checks

Re: Injecting error messages into ModelForm

2008-07-13 Thread Andrew Ingram
ModelForm is really just a convenient subclass of Form, so if you want additional validation methods you just have to implement/override the clean methods like you would with a normal form. The ease of validation that newforms allows is actually one of the main reasons I prefer Django over

Injecting error messages into ModelForm

2008-07-13 Thread Torsten Bronger
Hallöchen! 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