def get_users_with_role(role_prefix):
 return User.objects.filter(groups__name__startswith=role_prefix)

def get_users_with_role ( role_prefix ) : return User . objects . filter ( groups__name__startswith = role_prefix )
an expensive operation which finds all users in the db with the given role prefix .