Thank you. That helped me solving the problem :)
على السبت 12 تـمـوز 2014 20:12, كتب tim:
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 <mailto:django-users+unsubscr...@googlegroups.com>. To post to this group, send email to django-users@googlegroups.com <mailto: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 <https://groups.google.com/d/msgid/django-users/2464d4fe-cadc-45e5-a2bc-e0276d148f31%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

--
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/53C29618.5050000%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to