-
Dear author, when we have the one-to-many relationship for example we have two simple models:
when we create ModelView to display them in stralette-admin, we use HasOne and HasMany. EX:
In the dashboard, the value for the relationship fields represents the ids of the relationships. Also, if you notice in the above PostImage model we have the "post_id" field. how do I display it in the dashboard? RelationFiled does not work. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
https://jowilf.github.io/starlette-admin/user-guide/configurations/modelview/#object-representation |
Beta Was this translation helpful? Give feedback.
yes https://github.com/jowilf/starlette-admin-demo/blob/8973e1f17a1a2187eb012e6e52bf75290a74489f/app/sqla/models.py#L43