1
0
mirror of https://github.com/django/django.git synced 2025-10-24 22:26:08 +00:00

queryset-refactor: Fixed a couple of typos that were messing up extra(select=...).

git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6512 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick
2007-10-15 00:29:55 +00:00
parent 201c15dcb6
commit 05ebc901fe
3 changed files with 8 additions and 2 deletions

View File

@@ -310,6 +310,12 @@ Bug #2076
>>> Ranking.objects.extra(tables=['django_site'], order_by=['-django_site.id', 'rank'])
[<Ranking: 1: a3>, <Ranking: 2: a2>, <Ranking: 3: a1>]
>>> qs = Ranking.objects.extra(select={'good': 'rank > 2'})
>>> [o.good for o in qs.extra(order_by=('-good',))] == [True, False, False]
True
>>> qs.extra(order_by=('-good', 'id'))
[<Ranking: 3: a1>, <Ranking: 2: a2>, <Ranking: 1: a3>]
Bugs #2874, #3002
>>> qs = Item.objects.select_related().order_by('note__note', 'name')
>>> list(qs)