Django union

2021. 3. 27. 13:27파이썬/Django

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',)