Re: clean method in a model

2010-11-09 Thread refreegrata
de. > > Does that make sense? > > On Nov 9, 2:39 pm, refreegrata wrote: > > > ok, thanks for the answer, but I want use the clean method in a model, > > not in a form. For that in the clean method I throw a ValidationError, > > but the error message isn't asso

Re: clean method in a model

2010-11-09 Thread cootetom
ut a model doesn't work like that as it would only be manipulated directly in python code. Does that make sense? On Nov 9, 2:39 pm, refreegrata wrote: > ok, thanks for the answer, but I want use the clean method in a model, > not in a form. For that in the clean method I throw a Valid

Re: clean method in a model

2010-11-09 Thread refreegrata
ok, thanks for the answer, but I want use the clean method in a model, not in a form. For that in the clean method I throw a ValidationError, but the error message isn't associated to the field form of the modelform. On 8 nov, 19:17, cootetom wrote: > If you want to associate an er

Re: clean method in a model

2010-11-08 Thread cootetom
shows how to associate a error with a specific field in a form class. On Nov 8, 8:40 pm, refreegrata wrote: > Hello list. I want to use the clean method in a model. > -- > class myModel(models.Model): >     fields > >

clean method in a model

2010-11-08 Thread refreegrata
Hello list. I want to use the clean method in a model. -- class myModel(models.Model): fields def clean(self): raise ValidationError('The Error.') --- Thats works fine. M