Re: how to filter request.user.groups.all()

2015-11-09 Thread frocco
I was stuck on the syntax. This seems to be working. return qs.filter(company__in=list(request.user.groups.all())) On Monday, November 9, 2015 at 1:46:19 PM UTC-5, frocco wrote: > > Hello, > > request.user.groups.all() returns: > > [, ] > > > z = request.user.groups.all() > > I am trying to lim

Re: how to filter request.user.groups.all()

2015-11-09 Thread James Schneider
On Mon, Nov 9, 2015 at 10:46 AM, frocco wrote: > Hello, > > request.user.groups.all() returns: > > [, ] > > > z = request.user.groups.all() > > I am trying to limit records based on: > > mytable.filter(company__in=z) > > > What am I doing wrong? > > >From the look of it, nothing. What happens whe

how to filter request.user.groups.all()

2015-11-09 Thread frocco
Hello, request.user.groups.all() returns: [, ] z = request.user.groups.all() I am trying to limit records based on: mytable.filter(company__in=z) What am I doing wrong? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe fro