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

前端 未结 5 1988
夕颜
夕颜 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:56

    You can't do that in Django. Either use generic relations or a Django app that add this feature like django_polymorphic.

提交回复
热议问题