Answers for "Loop inner fiter()"

0

Loop inner fiter()

from operator import and_
from django.db.models import Q

categories = ['holiday', 'summer']
res = Photo.filter(reduce(and_, [Q(tags__name=c) for c in categories]))
Posted by: Guest on August-11-2021

Code answers related to "BASIC"

Browse Popular Code Answers by Language