2008/9/27 Malcolm Tredinnick <[EMAIL PROTECTED]>: > Not really, except for writing a raw SQL query. The raw SQL for this > type of query is very complicated and it's such an edge case (it's > trying to do if-then logic in SQL when you write it out) and not always > even possible, so Django doesn't even try. If you order on a > multi-valued field and have more than one related value, you'll get > multiple rows. > > You might want to prefer to do the ordering in Python or as a second > pass. Or you could try to write the raw SQL, but it could be fairly > messy.
Ok. Is it possible to pass the queryset to the generic view after ordering with python, or I have to rewrite also the generic view? -- Alessandro Ronchi Skype: aronchi http://www.alessandroronchi.net SOASI Soc.Coop. - www.soasi.com Sviluppo Software e Sistemi Open Source Sede: Via Poggiali 2/bis, 47100 Forlì (FC) Tel.: +39 0543 798985 - Fax: +39 0543 579928 Rispetta l'ambiente: se non ti è necessario, non stampare questa mail --~--~---------~--~----~------------~-------~--~----~ 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] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---