-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Add support for Django 3.1 JSONField #7467
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
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.
👍 lgtm
@rpkilby is it possible to bump this fix before version 3.12? |
A few comments to remind us to remove the |
ArrayField and HStoreField will still be supported. I think the postgres JSONField will continue to work until Django 4.0. |
I think we're fine merging as-is? We can remove the postgres-specific
@jairhenrique Most likely no. DRF doesn't maintain "stable" branches, and master is currently targeting the upcoming 3.12 release. Per #7460, Tom specially created the 3.11.1 release to quickly add Django 3.1 compatibility. |
Oops, I didn't notice that the |
Django 3.1 adds a new generic JSONField to replace the PostgreSQL-specific one. This adds support for the new field type, which should behave the same as the existing PostgreSQL field. Django's new JSONField also includes support for a custom "decoder", so add support for that in the serializer field.
@rsalmaso I think I've addressed all your comments, and I've cleaned up the branch history. Can you take another look? |
👍 for me |
Okay, right, let's get this one in now, and start looking at what we need to do to roll a 3.12 release. Great work, thanks! 👍✨ |
Django 3.1 adds a new generic JSONField to replace the PostgreSQL-specific one. This adds support for the new field type, which should behave the same as the existing PostgreSQL field. Django's new JSONField also includes support for a custom "decoder", so add support for that in the serializer field.
Description
Django 3.1 adds a new generic JSONField to replace the PostgreSQL-specific one. This adds support for the new field type, which should behave the same as the existing PostgreSQL field.
Fixes #7466