values_list(2)
-
Django union
unionedImages = Trained_Image.objects.all().values_list('prefix').union(Image.objects.all().values_list('prefix')) for unionedImage in unionedImages : print(unionedImage) 결과 ('./aaa/aa/96',) ('./bbb/bb/97',)
2021.03.27 -
Django queryset distinct
queryset에서 'char' 컬럼에 대해서 distinct 적용 chares = list(set(boxes.values_list('char', flat=True).distinct()))
2021.02.20