You can use the following code:
if e in Entry.objects.all():
#do something
Or the best approach:
if Entry.objects.filter(id=e.id).exists():
#do something
You can use the following code:
if e in Entry.objects.all():
#do something
Or the best approach:
if Entry.objects.filter(id=e.id).exists():
#do something