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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user