Re: Query subset

2008-11-02 Thread Tonne
In this case, as the amount of data is fairly small, I'm inclined to download the full queryset and let the template ignore the irrelevant data. Thanks Russ & Marcelo for your very helpful insights. --~--~-~--~~~---~--~~ You received this message because you are

Re: Query subset

2008-10-31 Thread Russell Keith-Magee
On Fri, Oct 31, 2008 at 4:08 PM, Tonne <[EMAIL PROTECTED]> wrote: > > So, what I've done is use Model.objects.values() to limit the returned > values, which is not ideal as I'm losing the objectness of the > queryset. > > I've worked around the loss Queryset.get_absolute_url by using a less >

Re: Query subset

2008-10-31 Thread Marcelo Ramos
On Fri, Oct 31, 2008 at 5:08 AM, Tonne <[EMAIL PROTECTED]> wrote: > > So, what I've done is use Model.objects.values() to limit the returned > values, which is not ideal as I'm losing the objectness of the > queryset. > > I've worked around the loss Queryset.get_absolute_url by using a less >

Re: Query subset

2008-10-31 Thread Tonne
Thanks Marcelo. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED]

Re: Query subset

2008-10-31 Thread Tonne
So, what I've done is use Model.objects.values() to limit the returned values, which is not ideal as I'm losing the objectness of the queryset. I've worked around the loss Queryset.get_absolute_url by using a less than elegant semi-hardcoded url. So if I'm missing a blindingly obvious way of

Re: Query subset

2008-10-31 Thread Marcelo Ramos
On Fri, Oct 31, 2008 at 4:37 AM, Tonne <[EMAIL PROTECTED]> wrote: > > I have spent hours looking in the docs and one this list for an answer > to this problem: > > I have a model that has, for example, 20 fields. > > On my site's homepage, where I'd like to offer a preview version of > the

Query subset

2008-10-31 Thread Tonne
I have spent hours looking in the docs and one this list for an answer to this problem: I have a model that has, for example, 20 fields. On my site's homepage, where I'd like to offer a preview version of the object, I'd need to retrieve only say, half of those fields to be displayed. My