Changeset 6962
- Timestamp:
- 12/19/07 07:43:16 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/queryset-refactor/tests/regressiontests/queries/models.py
r6961 r6962 456 456 ... s.reverse() 457 457 ... params.reverse() 458 >>> Item.objects.extra(select=SortedDict(s), params=params).values('a','b')[0] 459 {'a': u'one', 'b': u'two'} 458 459 # This slightly odd comparison works aorund the fact that PostgreSQL will 460 # return 'one' and 'two' as strings, not Unicode objects. It's a side-effect of 461 # using constants here and not a real concern. 462 >>> d = Item.objects.extra(select=SortedDict(s), params=params).values('a', 'b')[0] 463 >>> d == {'a': u'one', 'b': u'two'} 464 True 460 465 461 466 # Order by the number of tags attached to an item.
