Answers for "test if instance in queryset django"

0

test if instance in queryset django

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

# === OR ===
    
if Entry.objects.filter(id=e.id).exists():
	...
Posted by: Guest on August-30-2021

Python Answers by Framework

Browse Popular Code Answers by Language