﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
6929	admin interface ignores multi-column ordering if it is set by default in the model	shamardin@…	nobody	"Even if there are several fields specified for ordering by default in Meta ordering or Admin ordering, the resulting view in the admin interface is ordered only by the first field.

How to reproduce:

Create a new app with these models.py:
{{{
from django.db import models

class Test(models.Model):
  a = models.CharField(max_length=5)
  b = models.CharField(max_length=5)

  def __unicode__(self):
    return 'a=%s,b=%s' % (self.a, self.b)

  class Meta:
    ordering = ['-b', '-a']

  class Admin:
    pass
}}}

Populate with test data from shell:
{{{
In [1]: from test.models import *

In [2]: t1 = Test(a='1', b='10')

In [3]: t2 = Test(a='2', b='10')

In [4]: t3 = Test(a='1', b='11')

In [5]: t4 = Test(a='2', b='11')

In [6]: t1.save()

In [7]: t2.save()

In [8]: t3.save()

In [9]: t4.save()
}}}
Observe the correct ordering:
{{{
In [10]: Test.objects.all()
Out[10]: [<Test: a=2,b=11>, <Test: a=1,b=11>, <Test: a=2,b=10>, <Test: a=1,b=10>]
}}}
Now browse the Test model in the admin interface and observe the incorrect ordering:

{{{
a=1,b=11
a=2,b=11
a=1,b=10
a=2,b=10
}}}"		closed	contrib.admin	dev		invalid			Unreviewed	0	0	0	0	0	0
