aiohttp_admin2
aiohttp_admin2 copied to clipboard
Typo in doc.
In the quick start guid, in the relations_to_many part (UserController to PostController). I assume the field 'id' should be 'author_id'.
relations_to_many = [
ToManyRelation(
# the name of current relation
name='user posts',
# the name of field which responsible for relation in the
# current table
left_table_pk='id', # THIS FIELD MUST BE author_id
# controller of the relation model (we can use controller
# class or callable function which return it).
relation_controller=lambda: PostController,
)
]
Maybe it is not important but i spent some time to figure out why only one post is displayed, although the author has several.