Thanks. I had just figured it out this very minute and was about to call
a 'nevermind.'

I had, I suppose out of habit, tried
c=Comments.objects.filter(usubjid.study_id__exact='CP-AI-005') Missed
the initial set of double underscores.

D'oh.

Thanks though. I appreciate your time.
J

-----Original Message-----
From: django-users@googlegroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Tim Shaffer
Sent: Tuesday, August 15, 2006 2:40 PM
To: Django users
Subject: Re: filter by related data



comments = Comment.objects.filter(usubjid__study_id__exact='CP-AI-005')

By using the usubjid__study_id syntax it lets django know that you want
to filter by study_id field in the usubjid (Patient) model.






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

Reply via email to