Django Polymorphic behaviour (Custom ForeignKey) without using GenericForeignKey
I’m working with a legacy DB (Postgresql) that has fields like edited_by_type, and edited_by_id in many tables. This is basically a polymorphic relation for RubyOnRails persons. This represents a FK relation to multiple models using combinations of these two fields. for example, the value of edited_by_type can be either user, admin, or client. These are … Read more