I am moving a project from Rails to Django with an outdated database. In Rails, I had a polymorphic association that allowed me to add a footnote to any row in the database. I am trying to implement the same thing in a Django application. I found documentation on a common relationship and it looks perfect. Unfortunately, first I need to create new fields in my old database to store the ContentType identifier for the respective models. I only used a polymorphic relationship with 2 tables, so all I need is those two matching identifiers from a Django application, but I cannot find a suitable command to find the ContentType identifier in Django.
Any suggestions are welcome. I tried to find the previous questions, but could not find what I was looking for. Thank you so much for your time and help.
Jean bauer
source share