Re: stable sort for list views in the admin interface
On Sun, Nov 15, 2009 at 10:55 AM, Andrew Ball <anball@gmail.com> wrote:
I've noticed that in Django 1.1 when I sort based on a column in the admin interface's list view for one of my models and then sort by a different column, the second result set is no longer sorted based on the first column selected. This means that the sorting algorithm used is not a stable sorting algorithm. Does anyone know how to go about making the admin interface use a stable sorting algorithm instead? I'm capable of implementing a stable sorting algorithm in Javascript, but don't know where to start to find the code that actually performs the sorting when I click on a column in the list view.
Sort in the admin is implemented via order_by:
http://docs.djangoproject.com/en/dev/ref/models/querysets/#order-by-fields
Thus, the actual sort is done by the database.
Karen
--
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 django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home