📅  最后修改于: 2022-03-11 14:45:44.368000             🧑  作者: Mango
from django.db.models import Q
Contact.objects.filter(Q(last_name__icontains=request.POST['query']) |
Q(first_name__icontains=request.POST['query']))