Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
django-jsonfield-compat
Advanced tools
Compatability layer between django-jsonfield and Django's native JSONField
Django 1.9 introduced first-class support for Postgresql's json type.
Not everyone uses Postgresql, nor has upgraded to 1.9 yet, so a mixed ecosystem exists. Unfortunately, these two field types cannot be used together in the same project.
django-jsonfield-compat was created to be able to allow 3rd-party libraries to work in both worlds.
Requires Django >= 1.8
pip install django-jsonfield-compat
Adjust all instances of importing JSONField
and JSONFormField
to jsonfield_compat
's definition (including all migration files!)
from jsonfield_compat import JSONField
from jsonfield_compat.forms import JSONFormField
Register your app from the AppConfig class's ready()
function.
Example apps.py
:
from __future__ import unicode_literals
from django.apps import AppConfig
class MyAppConfig(AppConfig):
name = 'myapp'
verbose_name = "My App"
def ready(self):
import jsonfield_compat
jsonfield_compat.register_app(self)
Now, when users of your application want to switch from using django-jsonfield
's implementation
to Django's native JSONField
, they add the setting:
USE_NATIVE_JSONFIELD = True
And then run migrations to convert the app's DB tables to use the JSON column type.
django-jsonfield-compat is licensed under the MIT license (see the LICENSE
file for details).
FAQs
Compatability layer between django-jsonfield and Django's native JSONField
We found that django-jsonfield-compat demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.