Replies: 1 comment
-
As an update on this. Since opening this discussion almost two years ago, there has not been really any feedback. My feeling is that either Django Polymorphic support in DJA is not used anymore or people are not aware of this surrounding discussion. Through PR #1303 we have now deprecated Django Polymorphic support and pointing affected users to this discussion. In case there are still users of Django Polymorphic support in DJA, our goal is, that we bring those together here and hopefully support for Django Polymorphic in DJA can be added through a 3rdParty library like django-polymorphic-json-api or similar. If you are impacted of this deprecation, please speak up so we can see how we can move forward. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Support for Polymorphic models have been added through PR #211 in 2017.
Recently, we had the issue #1190 opened stating that includes do not work with Django Polymorphic integration. As compound documents is a core feature of DJA I was wondering who is actually using Django Polymorphic at all with DJA nowadays? When going back to the original PR, there was only code review discussion. As far as I can see, there was no discussion on why Django Polymorphic should be added to DJA at all and what use cases it covers.
Why I am starting this discussion is that how Polymorphic has been implemented in DJA increased the complexity of Django JSON API especially the renderer and some util functions. This increased maintenance burden and also recently, we had to add workarounds to get new Python version support (#1185) as Django Polymorphic has not been updated for a while. Django Polymorphic has been moved to Jazzband though which hopefully will improve the situation in the future.
Personally, to avoid additional complexity to DJA for an optional feature, I think a support for Django Polymorphic would be best added in a third party app like django-restframework-json-api-polymprohic or similar. This way it certainly won't interfere with DJA core features and would help improve the API of the whole DJA library as well.
However, before we make any decision, I want to ask that the people who use Django Polymorphic with Django REST framework JSON:API speak up what there are exactly using it for. That would be very helpful to make a good decision on how to move forward.
Thanks for your feedback.
Beta Was this translation helpful? Give feedback.
All reactions