Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Django Filter By Users Last Logged In
from django.contrib.auth.models import User
users = User.objects.order_by('-last_login')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment