Thursday, January 26, 2017

Re: Comparing two lists

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 <fishingwithjcbs@gmail.com>:
> 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 django-users+unsubscribe@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> 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 django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
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.

No comments:

Post a Comment