Hi.

I have read the (excellent) documentation but I can't figure out how
to do this. I know I might have to use annotations but I need some
extra help.

here it is, then.

I have a table which represents user friendships called
"Shortlist" (with fields from_user, to_user: both Foreign Keys to the
classic auth_user table. Namely, from_user befriends to_user).

I have another table into which I log user events/actions (UserLog).
In this table there are many fields including a timestamp and of
course user fields (user is again a foreign key to the auth_user
table)

how can I retrieve data from table "Shortlist" for a specific user
(from_user) ordered by the timestamp in UserLog table? Or how can I
retrieve Shortlist data for a specific from_user ordered by the total
number of "to_user" actions logged?

in other words I would like to retrieve all his/her friends that are
most active or order them by most recent action first.

Hope that makes sense,
Chris

-- 
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=en.

Reply via email to