Skip to content

Conversation

leo-naeka
Copy link
Contributor

As reported in #200, include paths can be compound of many nodes.
When requesting a deeply nested node, all intermediate nodes must be included as well.

This PR is similar to #200 but involves less code base modifications and includes tests.

Allow skipping of intermediate included models
…orm there

Fix regression on PY3 caused by unicode_literals
@rmmr
Copy link
Contributor

rmmr commented Feb 22, 2016

Looks great if you ask me, skips me the hassle of writing tests ;) I will cancel mine!

@leo-naeka
Copy link
Contributor Author

@adaptivdesign Of course you're part of the discussion. I'm pleased you found this great as well.

@rmmr
Copy link
Contributor

rmmr commented Feb 22, 2016

Credit where credit is due! I see you've implemented polymorphic support as well, I'll have to check that out. Although i'm using an own implementation (django-polymorphism). That is why I needed nested inclusions in the first place, so I could query polymorphic endpoints/relations like this:

/projects?include=artproject&include=researchproject
/author?include=projects.artproject&include=projects.researchproject

jerel added a commit that referenced this pull request Feb 22, 2016
Return intermediate resources for leaf includes. Fixes #149
@jerel jerel merged commit 3c9ab18 into django-json-api:develop Feb 22, 2016
@jerel
Copy link
Member

jerel commented Feb 22, 2016

@leo-naeka @adaptivdesign thank you both for your work on this.

@leo-naeka leo-naeka deleted the deep_inclusion branch June 28, 2022 12:08
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.

3 participants