Re: Querying Users with Permission

2008-09-25 Thread bobbyc
Looks like users = permission.user_set.all() works, but only if the permission is explicitly assigned to the user. Ideally, I'd like to assign the permissions in Groups. On Sep 25, 1:45 pm, bobbyc881 <[EMAIL PROTECTED]> wrote: > That gives an error... "Error was: 'Permission' object has no > attr

Re: Querying Users with Permission

2008-09-25 Thread bobbyc881
That gives an error... "Error was: 'Permission' object has no attribute 'users'" Seems like this should be easy... On Sep 25, 11:32 am, "Norman Harman" <[EMAIL PROTECTED]> wrote: > bobbyc881 wrote: > > I'm generating a list of Users in a specific group, in this case, > > "Artists", for a form: >

Re: Querying Users with Permission

2008-09-25 Thread Norman Harman
bobbyc881 wrote: > I'm generating a list of Users in a specific group, in this case, > "Artists", for a form: > > artist_group = Group.objects.get(name="Artists") > artist = > forms.ModelChoiceField(queryset=User.objects.filter(groups=artist_group), > required=False) > > I'd like to re-write thi

Querying Users with Permission

2008-09-25 Thread bobbyc881
I'm generating a list of Users in a specific group, in this case, "Artists", for a form: artist_group = Group.objects.get(name="Artists") artist = forms.ModelChoiceField(queryset=User.objects.filter(groups=artist_group), required=False) I'd like to re-write this to avoid using a Group that could