I am using Tortoise-ORM which is connected to PostgreSQL, and monitored by Postico. How to create a Foreign Key Field in the Tortoise-ORM such that it is a key in the table which acts a foreign key in another table. I am having problem to display it in the admin interface. FastAPI-admin interface.
#models.py file to create the table and its attributescity = fields.ForeignKeyField('us.City', null=True)
#resources.py file to show the fields on the FastAPI-admin interfacefields = [“city”]
I am creating the above field called “city” which acts a foreign key in this table. Instead of the actual values of the city, i.e., Mumbai, etc, its “id” is displaying in the database and on the FastAPI-admin interface. How to resolve the issue?