Changes between Initial Version and Version 1 of Ticket #5324
- Timestamp:
- Sep 3, 2007, 2:51:05 AM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #5324
- Property Owner changed from to
-
Ticket #5324 – Description
initial v1 3 3 For instance, assuming I have users, some of whom are in group Editors, some in group Sales, and most are not in a group at all. 4 4 5 1. from django.contrib.auth.models import User 6 2. user_qs = User.objects.all() # all users 7 3. non_editor_users = user_qs.exclude(groups__name='Editors') # should be all users excluding those in group Editors 5 {{{ 6 #!python 7 from django.contrib.auth.models import User 8 user_qs = User.objects.all() # all users 9 non_editor_users = user_qs.exclude(groups__name='Editors') # should be all users excluding those in group Editors 10 }}} 8 11 9 The set wrongly returned from (3)is actually the set of users who are in Sales but not in Editors - it fails to include those users who have no group at all.12 The set wrongly returned is actually the set of users who are in Sales but not in Editors - it fails to include those users who have no group at all. 10 13 11 14 The reason is the sql clause generated, which is doing