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.'
)
Writter.objects.filter(years_life__endswith=None)
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...@googlegroups.com.
To post to this group, send email to django...@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.
For more options, visit https://groups.google.com/d/optout.