Answer the question
In order to leave comments, you need to log in
Django how to bind fk and m2m elements?
Hello everyone, there are three tables product, category, department, product and category linked via Foreign key, because Each product belongs to only one category. Category and department are connected through manytomany, i.e. There can be several categories in one department. The question is, how to link (views) a product and a department, so that when you select a department, the page displays all the goods from the categories related to the department?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question