[Answer]-How to join 4 or 5 tables in Django

1👍

This seems an overly complex db structure.

But no matter how many tables you need to join, you can use the double-underscore syntax to query across the joins.

products = Product.objects.filter(levelcatitems__levelcats__levelsubs__levelzs__pk=18)

Leave a comment