aiohttp_admin2 icon indicating copy to clipboard operation
aiohttp_admin2 copied to clipboard

Typo in doc.

Open Cehovoi opened this issue 2 years ago • 0 comments

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.

Cehovoi avatar Jan 16 '23 08:01 Cehovoi