Skip to content

Instantly share code, notes, and snippets.

@bdero
Last active September 21, 2015 09:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save bdero/b0dcc725fe1cebedd414 to your computer and use it in GitHub Desktop.
Save bdero/b0dcc725fe1cebedd414 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