4👍
✅
Maybe this? (untested)
Person.objects.exclude(id__in=Person.objects.filter(project=p, status__is_red=True).values(id))
0👍
If you have a list of Status objects called ‘objects’, you can use
[s.person for s in objects]
to make it into a list of the corresponding Persons.
- [Django]-How to implement simple cron job with Heroku and Django
- [Django]-How do I define default permissions for users in Django Guardian?
- [Django]-Django: Add number of results
- [Django]-Django Haystack + Elasticsearch strange intermittent bug
Source:stackexchange.com