Skip to content
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

drf-nested-routers interoperability #18

Closed
ambsw-technology opened this issue Aug 2, 2017 · 1 comment
Closed

drf-nested-routers interoperability #18

ambsw-technology opened this issue Aug 2, 2017 · 1 comment

Comments

@ambsw-technology
Copy link

I'm using alanjds/drf-nested-routers to support nested paths like:

/patients/{patient_pk}/events/

When I use a HAL serializer in these nested views, the self link isn't generated correctly. I'm able to work around the issue by manually defining self:

self = HalHyperlinkedIdentityField(
    view_name='event-detail',
)

Is there a canonical way to be handling this? Do I need to be implementing some specific method? Should this be working "out of the box"?

@ambsw-technology
Copy link
Author

Just figured out that this is a limitation of DRF's list handing (and implied in the README).

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

No branches or pull requests

1 participant