for in Blog objects prefetch_related entry_set all for in print id

1
2
3
for b in Blog.objects.prefetch_related('entry_set').all():
for e in b:
print e.id