Skip to content

Conversation

arthur-s
Copy link

example to use:

members = ResourceRelatedField(
        queryset=Internal.objects.all(),
        many=True,
        related_resource_name='internals'
    )

When ManyToMany relation, ResourceRelatedField expects the relation type named internal, while my app sends to server data like

members: {data: [{type: "internals", id: "1"}, {type: "internals", id: "4"}]}

Also simplified choices property

@jerel
Copy link
Member

jerel commented Dec 8, 2015

Thanks for this. I'm going to close it since #152 or http://django-rest-framework-json-api.readthedocs.org/en/latest/usage.html#inflecting-object-and-relation-keys should solve any pluralization issues with relationships.

@jerel jerel closed this Dec 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants