def test_annotate_upper(self):
with override('nl'):
qs = Blog.objects.annotate(e=models.functions.Upper('title_i18n'))
self.assertEquals(
list(qs.values_list('e', flat=True)),
['VALK', 'VULTURE', 'BAT', 'DOLFIN', 'ZEBRA']
)
评论列表
文章目录