foxfirefey: A guy looking ridiculous by doing a fashionable posing with a mouse, slinging the cord over his shoulders. (geek)
[personal profile] foxfirefey posting in [community profile] django_dev
Let's say I have ColorProperty and DWThemeColor (which is the through of a ManyToMany between DWTheme and ColorProperty). And I want to get all distinct ColorProperties that belong to DWThemes. This is how:

ColorProperty.objects.filter(dwthemecolor__isnull = False).distinct()

You don't even want to know how long it took me to figure this out, people.
This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

Profile

django_dev: The Django logo. (Default)
Developing with Django

April 2014

S M T W T F S
  12345
6789101112
131415161718 19
20212223242526
27282930   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags