-
Notifications
You must be signed in to change notification settings - Fork 301
support polymorphic list with proper type/fields resolution #372
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
Render polymorphic list of items with different fields
Hi @robertobarreda. Thanks for the contribution. The project's policy is to only merge work that passes all continuous integration tests. If you're still interested in this branch, could you make sure that CI is passing. I'm happy to review once that check is out of the way. If that's not something you have time for, then we can close out the PR. |
Ah, it looks like CI might actually be failing because of a factory boy dependency problem. Once #373 is merged, you can probably merge develop into your branch to fix CI. |
fix get_polymorphic_serializer_for_instance only for PolymorphicModelSerializer
hi @robertobarreda, it looks like this might be close to ready. I think if you merge the |
* upstream/develop: Set release version to 2.3.0. (#383) Allow type field on none polymorphic serializers (#376) Fix for resolving source when accessing sub-attr eg b.c (#375) Fix typo in usage.md (#379) removed duplicate requirement (#377) Fix factory boy dependency (#373) [WIP] Fix example app (#362)
Sorry @mblayman, I merged the develop branch but CI is still failing :( |
Looks like there are a couple of issues:
Thanks for your diligence in working on this. I'm sure that users who use the polymorphic features will be grateful. |
Just found this pull request and realised that it would probably solve the issue #400 I raised as well as perhaps help with issue #401 which seemed similar. I can see that some tests still seemed to be failing on some of the travis builds that are configured to use older versions of python. @robertobarreda @mblayman Do you know what was blocking getting this merged in? |
Travis CI 😉 To keep our sanity on the project, we only merge stuff that passes Travis builds. I suspect there is a problem with circular imports with this PR, but I'm not certain. If someone has time to check out the branch, figure the problem out, and get the branch updated to work in CI, I'd be happy to merge this. |
@mblayman It makes perfect sense only merging stuff that passes the CI builds, I can perfectly understand that 😄 I have checked out out the code from this pull request and had a look at where the errors are coming from. It does seems they were being caused by the serializers import in the renderers file. From what I have read, the from x import y syntax requires a module to be completely initialized, whereas a simple import does not. By changing this, all of the tests now pass in my environment under both python2.7 and python3.6. I'd be quite happy to commit my changes. Is there any easy way I can add a commit to this pull request or would I need to open a new one? |
@adsized, thanks for looking into this. I'd suggest putting up a separate PR. We'll make sure that both you and @robertobarreda get credit for the work and get those issues closed out. Please note that we're now working off of I look forward to seeing the Pull Request! 😄 |
@adsized fixed the import issues in his PR. Thanks @robertobarreda! |
Render polymorphic list of items with different fields/type