[Answer]-Django โ€“ How to return tagged content from two models

1๐Ÿ‘

โœ…

If you convert the querysets to lists then you can just concatenate them

quertsetA = [p for p in Post.objects.filter(tags_name_iexact=slug, status=2)]
querysetB = [o for o in Other.objects.filter(tags_name_iexact=slug...)]
queryset = querysetA+querysetB
๐Ÿ‘คSam Sharp

Leave a comment