How can I define a polymorphic relation between models in Django?

前端 未结 5 1987
夕颜
夕颜 2021-02-05 14:25

I am working on a Django application which contains an Offer model. An Offer instance contains the pricing conditions and points to a product definiti

5条回答
  •  臣服心动
    2021-02-05 14:52

    Take a look at django-polymorphic, this implements this feature, and also uses ContentTypes internally.

提交回复
热议问题