On Jul 1, 4:29 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > Assuming all such problems have all been fixed now, though, it would seem > this restriction could be removed from admin. I did some experimenting and > if I remove the code in admin that prevents such sorting, everything seems > to work. I tried with sqlite, mysql, and postgres backends and included > records with null values in my tests. > > Anyone else know any reason why this restriction should be maintained? So > far as I can tell if the base queryset code now supports this kind of > ordering admin ought to take advantage of it?
There may be slight differences between the way the backends order records with NULLs, e.g. some may put NULLs first, others last. (From a quick glance it seems MySQL puts them first[1] and Oracle puts them last[2] when sorting in ascending order). I'll admit I'm not familiar enough with the respective backends to know if these differences are already handled or not. Also having records with NULL entries first/last varying across different backends might not be a deal breaker for the admin. Just my 2c. [1] http://dev.mysql.com/doc/refman/5.0/en/problems-with-null.html [2] http://www.orafaq.com/wiki/NULL --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---