Re: Using values_list and extra on same queryset

2013-03-27 Thread Larry Martell
On Wed, Mar 27, 2013 at 7:38 AM, Karen Tracey wrote: > > On Wed, Mar 27, 2013 at 9:19 AM, Larry Martell > wrote: >> >> Here's a very simple example showing it's not working for me >> >> (Pdb) CST.objects.all().extra(select={'ep': >> 1}).values_list('image_measurer_id') >> [(86456L,), (86454L,), (

Re: Using values_list and extra on same queryset

2013-03-27 Thread Karen Tracey
On Wed, Mar 27, 2013 at 9:19 AM, Larry Martell wrote: > Here's a very simple example showing it's not working for me > > (Pdb) CST.objects.all().extra(select={'ep': > 1}).values_list('image_measurer_id') > [(86456L,), (86454L,), (86452L,), (86450L,), (86448L,), (86446L,), > (86444L,), (86442L,), (

Re: Using values_list and extra on same queryset

2013-03-27 Thread Larry Martell
On Wed, Mar 27, 2013 at 6:52 AM, Tom Evans wrote: > On Wed, Mar 27, 2013 at 12:38 PM, Larry Martell > wrote: >> Ignore my last message - I was seriously sleep deprive3d when I made >> it. But my original question remains - how can I use values_list and >> extra on same queryset? > > It just seem

Re: Using values_list and extra on same queryset

2013-03-27 Thread Tom Evans
On Wed, Mar 27, 2013 at 12:38 PM, Larry Martell wrote: > Ignore my last message - I was seriously sleep deprive3d when I made > it. But my original question remains - how can I use values_list and > extra on same queryset? It just seems to WFM: Foo.objects.all().extra(select={'wibble': '1'}).val

Re: Using values_list and extra on same queryset

2013-03-27 Thread Larry Martell
On Tue, Mar 26, 2013 at 8:14 PM, Larry Martell wrote: > On Tue, Mar 26, 2013 at 4:51 PM, Larry Martell > wrote: >> I have some existing code that calls values_list on a queryset. I need >> to add something using extra to this queryset. If I call extra before >> values_list the extra stuff is gon

Re: Using values_list and extra on same queryset

2013-03-26 Thread Larry Martell
On Tue, Mar 26, 2013 at 4:51 PM, Larry Martell wrote: > I have some existing code that calls values_list on a queryset. I need > to add something using extra to this queryset. If I call extra before > values_list the extra stuff is gone from the query after the > values_list. If I call extra after

Re: Using values_list and extra on same queryset

2013-03-26 Thread Larry Martell
On Tue, Mar 26, 2013 at 5:04 PM, Andre Terra wrote: > Could you provide us any examples or code at all? The app is very abstracted. It builds a queryset, starting with: queryset = self.data_model.objects.filter(**args) then there are more calls to filter on it and then it finally gets to the c

Re: Using values_list and extra on same queryset

2013-03-26 Thread Andre Terra
Could you provide us any examples or code at all? Cheers, AT On Tue, Mar 26, 2013 at 7:51 PM, Larry Martell wrote: > I have some existing code that calls values_list on a queryset. I need > to add something using extra to this queryset. If I call extra before > values_list the extra stuff is go

Using values_list and extra on same queryset

2013-03-26 Thread Larry Martell
I have some existing code that calls values_list on a queryset. I need to add something using extra to this queryset. If I call extra before values_list the extra stuff is gone from the query after the values_list. If I call extra after the call to values_list it seems to have to effect - the extra