Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

test if instance in queryset django

if e in Entry.objects.all():
	...

# === OR ===
    
if Entry.objects.filter(id=e.id).exists():
	...
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #test #instance #queryset #django
ADD COMMENT
Topic
Name
3+3 =