I just use a generic list view and send it
user_dict = {
    'queryset': GpUser.objects.all(),
}
GpUser is my model that extends auth.user



On Feb 14, 2:47 am, "Aidas Bendoraitis" <[EMAIL PROTECTED]>
wrote:
> Your profile perhaps is related by a foreign key to the user, which
> means that theoretically one user can have several profiles.
> Therefore, in my opinion, you should get the profiles and use
> select_related() for related users.
>
> profiles = 
> UserProfile.objects.select_related().order_by('user__id')[offset:limit]
>
> Regards,
> Aidas Bendoraitis [aka Archatas]
>
> On 2/14/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi,
>
> > I have a site with users and an additional user_profile to store extra
> > information like a signature, avatar, etc.
>
> > I cannot figure out how to use a single query to get a list of users
> > and at the same time join in their user_profile information.
>
> > Currently I have this:
>
> > users = User.objects.all().order_by('id')[offset:limit]
>
> > But I can't figure out how to get their profiles joined to that query.
> > Any ideas?
>
> > thanks!


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to