Re: Reorder a queryset/list with respect to another list

2008-10-09 Thread Andrew Ingram
Malcolm Tredinnick wrote > Here's one way that comes to mind: When you do the selection based on > the id's, use the in_bulk() queryset method. That returns you a > dictionary mapping each id value to the object with that id (see below > for how to do this without in_bulk() if that's not convenien

Re: Reorder a queryset/list with respect to another list

2008-10-08 Thread Malcolm Tredinnick
On Wed, 2008-10-08 at 19:51 +0100, Andrew Ingram wrote: > Hi all, > > I'm using SolrPy to integrate django with solr for searching (very > simple to configure by the way, highly recommend it). But I have a > problem that I'm wonder if there's an elegant solution for either at the > Django tem

Reorder a queryset/list with respect to another list

2008-10-08 Thread Andrew Ingram
Hi all, I'm using SolrPy to integrate django with solr for searching (very simple to configure by the way, highly recommend it). But I have a problem that I'm wonder if there's an elegant solution for either at the Django template or Python level (I can solve the problem in a messy way, but I