Building.objects.filter(addresses__street__pk=patientid) will return
all buildings with an address in the same street as the patient. If I
understand correctly, that is :)

2017-01-26 10:41 GMT+01:00 Richard Hall <[email protected]>:
> Thanks for replying, I need all the help I can get. What I'm trying to do is
> the opposite of what I seem to be doing. Rather than looking for an address
> without a building I am trying to see, from my list of all buildings, which
> one has an address (filtered by patientid). I can easily list all addresses
> associated with a building, it is just getting only the ones for a
> particular patient that I'm stuck with.
>
> Thanks,
>
> Richard
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/0ec5c059-a0b3-41ab-8f42-2603e0d640e5%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



-- 

Cordialement, Coues Ludovic
+336 148 743 42

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEuG%2BTZP_XHQYeHJ9_FQGCBrn8S%2Bt3zfMbyf%2BHR4F8-02CsWzg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to