I want to read data from an external database and generate reports in Django. I am trying to create the required models for the data that I will be fetching. Is it possible to define relationships when doing this?
For example:
I have 2 tables, ITEMS and STAKEHOLDERS, each ITEM has many STAKEHOLDERS. Is it possible to define the models such that, when I do, ITEM.objects.get(pk = 1).STAKEHOLDERS, I get all the stakeholders for that specific item?
Some additional details: I will be using custom sql to fetch the data for an ITEM and Stakeholder.