-
Notifications
You must be signed in to change notification settings - Fork 2.9k
15156 Add display_url to REST API #16412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
jeremystretch
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we subclass HyperlinkedIdentityField to define a custom field which dynamically resolves the view name from the serializer's model? We could then include this field on BaseModelSerializer, saving a ton of boilerplate. It could likewise replace the existing url field on all serializers too.
jeremystretch
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
jeremystretch
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @arthanson!
Fixes: #15156