1
在下面的查詢如何消除重複,Django的查詢消除重複
d_query = Profile.objects.filter(company="12")
search_string ="Tom"
if search_string != "":
d_query = d_query.filter(Q(profiles__name__icontains=search_string) | Q(first_name__icontains=search_string)| Q(last_name__icontains=search_string))