On 10-Oct-06, at 5:04 PM, Russell Keith-Magee wrote:

> More a limitation than a problem. Python dictionaries are what they
> are - your use case is a little unusual compared to what I have
> usually seen the extra(select=...) field used for.
>
> One workaround I can think of is to use
> django.util.datatypes.SortedDict for your select clause. SortedDict is
> a Django datatype that implements the dictionary protocol but
> remembers insertion order. I haven't tried this myself, but I can't
> think of any obvious reason that it wouldn't work.
>
> The other alternative, as you suggested, is to hand-crank the SQL from
> scratch. Not ideal, I know, but it would work :-)

I tried using django.utils.datastructures.SortedDict, and it did not  
solve the problem for me. I think the dict I pass to extra's select  
parameter is merged with another dict, and so loses its order.

Thanks,
Beau

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to