Ticket #10132: 10132-test.diff
File 10132-test.diff, 832 bytes (added by , 16 years ago) |
---|
-
tests/regressiontests/queries/models.py
1028 1028 >>> Annotation.objects.filter(notes__in=Note.objects.filter(note="n1").values_list('note').values('id')) 1029 1029 [<Annotation: a1>] 1030 1030 1031 Bug #10132 -- QuerySet values() should work on extra(select) fields 1032 >>> from django.db.models import Count 1033 >>> test = Item.objects.extra(select={"note_alias": "note_id"}).values("note_alias") 1034 >>> test.order_by("note_alias").annotate(Count("id")) 1035 [{'note_alias': 1, 'id__count': 2}, {'note_alias': 2, 'id__count': 1}, {'note_alias': 3, 'id__count': 3}] 1036 1031 1037 """} 1032 1038 1033 1039 # In Python 2.3 and the Python 2.6 beta releases, exceptions raised in __len__