-
Notifications
You must be signed in to change notification settings - Fork 297
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
Reverse the included relation name formatting #204
Conversation
I have yet to figure out how the unit testing works... |
As far as the tests go |
I think for it to test the existing code I'd have to rename all the 'comments' and 'authors' to singular.. which has an effect on the "relationships" too.. not sure if it's OK to do that? edit Ok I found a (hacky) way to at least test the singularize :) |
parse_relation = getattr(settings, 'JSON_API_PARSE_INCLUDE_KEYS', None) | ||
singularize_included = getattr(settings, 'JSON_API_SINGULARIZE_INCLUDE_TYPE', None) | ||
|
||
settings.JSON_API_PARSE_INCLUDE_KEYS = 'underscore' |
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.
pytest-django provides a good way of doing this: http://pytest-django.readthedocs.org/en/latest/helpers.html#settings
Quote from #257:
I suggest this PR be expanded to also apply the reversal to attribute/relationship parsing here. |
Hi, @schtibe. Thanks for the contribution! This branch is now in conflict in the main branch. Are you interested in fixing this up or should we close out this PR? I'm stepping up to maintain the PR queue and get DRF JA changes flowing again, but I can't merge conflicted stuff. If this is still valuable, resolving the merge conflicts will give me a chance to review it well. If this is no longer important to you, closing the PR is right next step. Please let me know what you'd like to do. Thanks! |
Hi @mblayman. I'd like to see if I can fix the the conflict, but I'm currently not even sure anymore if the issue adressed in this PR really complies with the JSON API standard. Please give me some time as I cannot check it right away. |
Ok I don't see the possibility any time soon to investigate further. |
will try to investigate this in near future |
@sliverc do you see the approach of this PR right? |
See #203 for more information