Hi, I extended the user class with a UserProfile, with the Django docs tutorial. But now I need to do a query to list all users that haven't payed (pay='No').
I tried something like this: *User.objects.filter( User.get_profile().paid='No' )* or *User.objects.filter( User.profile.paid='No' )* But no lucky... Even tried an objects.extra like this: *User.objects.extra(* * ** select={* * **'users': 'SELECT * FROM auth_user, app_userprofile \* * **WHERE app_userprofile.id = auth_user.id \* * **AND app_userprofile.paid=\'No\''* * ** }* * ** )* But the template raises an exception: "Caught an exception while rendering: only a single result allowed for a SELECT that is part of an expression" Any advices? -- Greetings, Carlos Ricardo Santos -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=.