=======================

[](https://coveralls.io/github/kbussell/django-jsonfield-compat?branch=master)
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
Installation
------------
`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.
License
-------
django-jsonfield-compat is licensed under the MIT license (see the `LICENSE` file for details).
Metadata
Release files for django-jsonfield-compat 0.4.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-jsonfield-compat-0.4.4.tar.gz | 3.4 kB | Without provenance | Details for django-jsonfield-compat-0.4.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_jsonfield_compat-0.4.4-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for django_jsonfield_compat-0.4.4-py2.py3-none-any.whl |
Total release size: 10.2 kB
Release files / django-jsonfield-compat-0.4.4.tar.gz
| Download URL | django-jsonfield-compat-0.4.4.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0182d2e9db886abc2bf30958e4953f72b6f0e20336524755641bc3968899cd5b
|
|
BLAKE2b-256 checksum How to use checksums |
5cb3fd67cc1a09322e715322bfaf219c0693b5e0522659074ada49cf1c91d692
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / django_jsonfield_compat-0.4.4-py2.py3-none-any.whl
| Download URL | django_jsonfield_compat-0.4.4-py2.py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
e2b1cd7dfef7633c8befb9c85fa764d344377512c8fdaf65ded4827392410a1d
|
|
BLAKE2b-256 checksum How to use checksums |
55e8ac686ec7499f0675fdcf2c9a5ad26a4bd02c23303f5bbd94028dd5e37b0b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-jsonfield-compat 0.4.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.