Re: ModelForm always calls Model's clean method

2010-05-26 Thread Rendy Anthony
My mistake in the model definition. They are supposed to be foreign keys to the same model. Thank you for the explanation. I was expecting something like the errors variable like in a Form. Unfortunately there is no equivalent "error" variable in the model validation. Here is what I can do in form

Re: ModelForm always calls Model's clean method

2010-05-19 Thread Karen Tracey
On Wed, May 19, 2010 at 1:12 AM, ak37 wrote: > I just tried the new Model Validation feature in Django 1.2 and I > found out that ModelForm always calls the Model's clean method even > when the form validation has errors. This causes problems when the > model has a foreign key, and the value is v

ModelForm always calls Model's clean method

2010-05-18 Thread ak37
Hi, I just tried the new Model Validation feature in Django 1.2 and I found out that ModelForm always calls the Model's clean method even when the form validation has errors. This causes problems when the model has a foreign key, and the value is validated in the clean method. Consider this exampl