Re: Need help changing the ordering of a queryset stored in session

2009-01-22 Thread Brandon Taylor
Thanks Malcom, Looks like sorted in combination with the operator module is the key to my problem. Now I can do: import operator vehicle_list = Vehicle.objects.all().select_related(depth=1) vehicles = list(sorted(vehicle_list, key=operator.attrgetter ('model_year or whatever'))) ...and do

Re: Need help changing the ordering of a queryset stored in session

2009-01-22 Thread Malcolm Tredinnick
On Wed, 2009-01-21 at 21:40 -0800, Brandon Taylor wrote: > Hi everyone, > > I need to do some table sorting and paging. To reduce trips to the DB, > I'm storing my initial queryset in a session using the file system > backend for local development. > > I was thinking I might be able to use the

Need help changing the ordering of a queryset stored in session

2009-01-21 Thread Brandon Taylor
Hi everyone, I need to do some table sorting and paging. To reduce trips to the DB, I'm storing my initial queryset in a session using the file system backend for local development. I was thinking I might be able to use the dictsort filter and just pass in the column as a variable to do the