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

State of NestedViewSetMixin #138

Open
Amoki opened this issue Jun 25, 2019 · 1 comment
Open

State of NestedViewSetMixin #138

Amoki opened this issue Jun 25, 2019 · 1 comment

Comments

@Amoki
Copy link
Contributor

Amoki commented Jun 25, 2019

Regarding the NestedViewSetMixin:
The parent_lookup_kwargs updates the get_queryset method that is only called in the view but is defined in the Serializer.
If two different views (different kwargs) serialize the same object, we need to have two Serializers with different parent_lookup_kwargs.

If it makes sense for HyperLinked, it does not for NestedViewSetMixin.

Does it make sense to open a Pull Request and move the parent_lookup_kwargs to the ViewSet (keeping retro-compatibility with a warning) ?

@alanjds
Copy link
Owner

alanjds commented Jul 3, 2019

I think so. Thanks for raising the problem and the hand to solve it. Helps a lot.

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

2 participants