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