Hello i have a wallpaper website. Im using taggit. I have 200k tags and have 20k wallpaper.
I want use related wallpapers in view like this
def detail(request,slug):
wallpaper = get_object_or_404(Wallpapers, slug = slug)
category = Category.objects.all()
similar_posts = wallpaper.tags.similar_objects()[:20]
random.shuffle(similar_posts)
return render(request, "detail.html", {"wallpaper": wallpaper, "category": category, "similar_posts": similar_posts, })
and i take "too many SQL variables" error.
example wallpaper tags: anime, water, rain
15k+ wallpaper have anime tag
How can i limit or filter query this related wallpaper items?