Skip to content

Conversation

Anton-Shutik
Copy link
Contributor

No description provided.

@Anton-Shutik
Copy link
Contributor Author

Anton-Shutik commented Apr 15, 2016

Sometimes I need to use other field name in the url rather that it is on e model.
For example:

class Model(models.Model):
    field1 = models.CharField()

but relation self link should be:
api/account/123/relations/field2

By that way it will be easier to override that name.

What do you think ?

@jerel
Copy link
Member

jerel commented Apr 15, 2016

It seems good to me to extract this to a method. Could you also add some docs for others that will want to use it?

@Anton-Shutik
Copy link
Contributor Author

@jerel Just added the note

@jerel jerel merged commit bb26764 into django-json-api:develop Apr 18, 2016
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