1
동일 모델의 기존의 검색어를 기반으로 accounts = Account.objects.filter("account in either of accountset1 accountset2")
내가 장고에서 다음을 수행 할
어떻게하면 되나요?
동일 모델의 기존의 검색어를 기반으로 accounts = Account.objects.filter("account in either of accountset1 accountset2")
내가 장고에서 다음을 수행 할
어떻게하면 되나요?
Q
object을 사용하고 한 줄로 쿼리 할 수 있습니다.
from django.db.models import Q
accounts = Account.objects.filter(Q(some query) | Q(some other query))