"Matt Wilson" <[EMAIL PROTECTED]> writes:
I think this thread is relevant to a problem I'm wrestling with.
I've got users, roles, and projects, each being a RelatedJoin to the
other. I don't know how to select any users that have the role "X" on
project "Y".
Is there an easy way?
You'll have to loop. That's how SQL Object (I suppose you're using it) does
the job.
users = model.User.select()
project = model.Project.get(project_id)
selected_users = list()
for user in users:
if project in user.projects:
selected_users.append(user)
Be seeing you,
--
Jorge Godoy <[EMAIL PROTECTED]>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---