Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

django check if queryset is empty

if some_queryset.exists():
    print("There is at least one object in some_queryset")
 
PREVIOUS NEXT
Tagged: #django #check #queryset #empty
ADD COMMENT
Topic
Name
3+8 =