Hi Marco, In Django 1.0, you don't need to call clean from clean, Django will do that automatically for you. :)
So what you can do is: def clean(self): data = self.cleaned_data if (data['firstDate'] >= data['lastDate']): raise ValidationError("Error") # else return data That should work. For more info, see: http://docs.djangoproject.com/en/dev/ref/forms/validation/ Wim On Mar 6, 11:46 am, MarcoS <marc.se...@gmail.com> wrote: > .... Sorry, i've posted without finishing the message.... :) > > So, if I call clean(self), Django give me this exception for the > following line: > > super(forms.DateField, self).clean() > > Exception Type: TypeError > Exception Value: > super(type, obj): obj must be an instance or subtype of type > > To solve it I tried to replace > > super(forms.DateField, self).clean() > > with: > > super(DateField, self.fields['firstDate']).clean(self) > > but I think isn't correct and however the super class doesn't raises > any > exception for input that isn't in a date format. > > Please, give me any ideas --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---