Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Misleading docs on field_name_mapping for overriding related_field in urls #748

Closed
@BlaiseGratton

Description

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

        AltStyle によって変換されたページ (->オリジナル) /