[Django]-Filter Queryset on empty ImageField

31👍

Try this:

Book.objects.filter(picture__exact='')

10👍

Just run the exclude method:

Books.objects.exclude(picture='')

Leave a comment