Re: Django Many-to-many Query: Publications with no Articles? Publications with some Articles?

2015-08-24 Thread Shawn Milochik
I couldn't find it in Django's documentation; just from StackOverflow and another source (both found via Google). I always used to do something like Thing.objects.filter(other__id__isnull=True) to do that, but clearly this is better. -- You received this message because you are subscribed to the

Re: Django Many-to-many Query: Publications with no Articles? Publications with some Articles?

2015-08-24 Thread Edward Sitarski
Thanks - didn't see that one. For my own reference/sanity, can you attach a link where this is documented? I should have found this one before too. > -- You received this message because you are subscribe

Re: Django Many-to-many Query: Publications with no Articles? Publications with some Articles?

2015-08-21 Thread Shawn Milochik
No articles: Publication.objects.filter(article_set=None) Has articles: Publication.objects.exclude(article_set=None) -- 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 emai

Django Many-to-many Query: Publications with no Articles? Publications with some Articles?

2015-08-21 Thread Edward Sitarski
I have read the Django Many to Many documentation . Based on the example, I am stuck on how to formulate the following queries (this related to my "real life" problem): 1. What Publications have no Articles? 2. What P