Following James' tutorial (http://www.b-list.org/weblog/2006/06/06/django-tips-extending-user-model) I created a UserProfile model, that is essentially:
class UserProfile(models.Model): board_member = models.BooleanField() user = models.OneToOneField(User) What I want is a list of Users, ordered by last_name, filtering on board_member=True. I tried this: User.objects.filter(get_profile__board_member=True), but this gives the following: TypeError: Cannot resolve keyword 'get_profile' into field So I'm guessing that the filter syntax can't handle methods, just attribute fields. So to fix this, I tried going the other direction, by filtering on UserProfile, and then ordering the results on User, doing this: UserProfile.objects.filter(board_member=True).order_by('auth_user.last_name') but I get this: OperationalError: (1054, "Unknown column 'auth_user.last_name' in 'order clause'") Any thoughts on this? Is this simply not possible with get_profile/AUTH_PROFILE_MODULE Thanks, Jay P. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---