There are 2 models. One model describes the product, the other describes the options. Any of the models can have any of the options. Hence, this is a Many-to-Many field. But there is one problem. For goods, this is a required option, but not for others. How to organize this in the context of Django ORM?

    1 answer 1

    Perhaps you will help the institution of an intermediate model, you can store the flag of commitment in it. Documentation .

    • Good decision, thanks for the example. If I don’t think of anything with a smaller number of entities, I’ll use this one. - NWSkyFox 1:54 pm