Answer the question
In order to leave comments, you need to log in
How to implement a polymorphic model in Django?
I would like to know how to implement a polymorphic model in Django? I know that there is a django-polymorphic module, but it is no longer supported. So far, it only comes to mind to implement all fields within one model, and simply specify None for unnecessary ones. Django3.0, python3.8, if it matters then the DB is postgresql
Answer the question
In order to leave comments, you need to log in
In addition to django-polymorphic, there is also django-model-utils with its InheritanceManager.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question