[Django]-QuerySet for non-empty TextField

35👍

.exclude(notes=u'')

Read more here: django.db.models.query.QuerySet.exclude

3👍

you can also use Q object:

from django.db.models import Q
Item.objects.filter(~Q(notes=''))
👤Sergey

Leave a comment