Skip to content

Misleading docs on field_name_mapping for overriding related_field in urls #748

Closed
@BlaiseGratton

Description

@BlaiseGratton

In the end of this section, the key and value of this dictionary should be swapped:

field_name_mapping = {
    'line_items': 'order_items'
}
# should be:
field_name_mapping = {
    'order_items': 'line_items'
}

The language for overriding related_name in a url is a bit confusing and it took me a bit to realize this map was the problem, and wanted to save others the trouble of messing around with this configuration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions