Skip to content

Instantly share code, notes, and snippets.

@wwj718
Forked from bdero/missing_profiles.py
Last active September 21, 2015 09:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wwj718/130cc19002ff38dece24 to your computer and use it in GitHub Desktop.
Save wwj718/130cc19002ff38dece24 to your computer and use it in GitHub Desktop.
edX: Get users without student profiles
from django.contrib.auth.models import User
from student.models import UserProfile
profileless = [user for user in User.objects.all() if not UserProfile.objects.filter(user=user).count()]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment