Look like it is expected behaviour.
filter builds sql, any sql should have sence. What is sence with broken sql
?

Many thanks,

Serge


+380 636150445
skype: skhohlov

On Wed, Jun 15, 2016 at 1:09 PM, Seti Volkylany <setivolkyl...@gmail.com>
wrote:

> The model next:
>
> class Writter(models.Model):
>     """
>     Model for writters of books
>     """
>
>     id = models.UUIDField(primary_key=True, editable=False, default=uuid.
> uuid4)
>     name = models.CharField(
>         _('Name'),
>         max_length=200,
>         validators=[MinLengthValidator(settings.
> MIN_LENGTH_FOR_NAME_OR_TITLE_OBJECT)],
>         unique=True,
>         error_messages={'unique': _('The such writter already is here.')}
>     )
>     slug = ConfiguredAutoSlugField(_('Slug'), populate_from='name', unique
> =True)
>     #
>     # basic trends of books
>     #
>     about = models.TextField(
>         _('About writter'),
>         validators=[MinLengthValidator(100)],
>         help_text=_('Give brief character of the writter and his books.')
>     )
>     years_life = IntegerRangeField(
>         _('years life'),
>         null=True,
>         blank=True,
>         help_text='Enter year birth and year death, if have.'
>     )
>
>
>
> I am tried next:
>
>  Writter.objects.filter(years_life__endswith=None)
>
> but found error:
>
>     allow_joins)
>         998         if value is None:
>         999             if lookups[-1] not in ('exact', 'iexact'):
>     -> 1000                 raise ValueError("Cannot use None as a query
> value")
>        1001             lookups[-1] = 'isnull'
>        1002             value = True
>
>     ValueError: Cannot use None as a query value
>
>
> --
> 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 https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/72566fb6-79ba-416c-9e3f-7b07a7df6e3f%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/72566fb6-79ba-416c-9e3f-7b07a7df6e3f%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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CADTRxJP9y65d712bs-yNECGtcB6L1e49cy8MS6Yb75ZeF%3DtKew%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to