Skip to content

Typo in doc. #9

@Cehovoi

Description

@Cehovoi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions