Model validation is not invoked when calling model.save(). You can read 
more 
here: 
https://docs.djangoproject.com/en/1.6/ref/models/instances/#validating-objects

On Saturday, July 12, 2014 6:46:17 AM UTC-4, thebsom wrote:
>
> Hello 
> I am creating a django library application. I have made a book model and 
> it has some fields with validators. Most of them are standard 
> MinValueValidator and MaxValueValidator. 
> Using the webserver, the validators work completely fine. I see errors 
> when I put invalid values. However, when I tested saving objects using 
> the shell, the validators are not called. I am using the shell because I 
> am planning to import the database from existing csv files. 
>
> Is there something wrong? Or am I responsible to call the validators 
> manually before save()? 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2464d4fe-cadc-45e5-a2bc-e0276d148f31%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to