How can I base a query on a foreign key field?  If I have a project
and I have messages for the project, and I only want to return
messages from active projects, how do I write that?  I already have a
manager for getting active messages, and that works, but then I also
need something like this for active project filtering:

msgs = Messages.active.filter( Q( project=project.id, project.active=True ) )


Thanks,



-- 
Greg Donald
http://destiney.com/

--~--~---------~--~----~------------~-------~--~----~
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