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