Skip to content

Instantly share code, notes, and snippets.

@valerybriz
Created May 2, 2019 21:54
Show Gist options
  • Save valerybriz/d175634a78cda86d8362249cbc55c570 to your computer and use it in GitHub Desktop.
Save valerybriz/d175634a78cda86d8362249cbc55c570 to your computer and use it in GitHub Desktop.
iterator
for user in User.objects.exclude(email__isnull=True).iterator():
print(user.name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment