Skip to main content

Django json widget is an alternative widget that makes it easy to edit the jsonfield field of django.

Project description

https://badge.fury.io/py/django-json-widget.svg https://travis-ci.org/jmrivas86/django-json-widget.svg?branch=master https://codecov.io/gh/jmrivas86/django-json-widget/branch/master/graph/badge.svg

An alternative widget that makes it easy to edit the new Django’s field JSONField (PostgreSQL specific model fields)

Quickstart

Install django-json-widget:

pip install django-json-widget

Add it to your INSTALLED_APPS:

INSTALLED_APPS = (
    ...
    'django_json_widget',
    ...
)

Add the widget in your admin.py:

from django.contrib import admin
from django.contrib.postgres import fields
from django_json_widget.widgets import JSONEditorWidget
from .models import YourModel


@admin.register(YourModel)
class YourModelAdmin(admin.ModelAdmin):
    formfield_overrides = {
        fields.JSONField: {'widget': JSONEditorWidget},
    }

JSONEditorWidget widget

Before:

https://raw.githubusercontent.com/jmrivas86/django-json-widget/master/imgs/jsonfield_0.png

After:

https://raw.githubusercontent.com/jmrivas86/django-json-widget/master/imgs/jsonfield_1.png

Credits

Tools used in rendering this package:

History

0.1.0 (2017-05-10)

  • First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-json-widget-0.1.1.tar.gz (191.0 kB view details)

Uploaded Source

Built Distribution

django_json_widget-0.1.1-py2.py3-none-any.whl (190.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file django-json-widget-0.1.1.tar.gz.

File metadata

File hashes

Hashes for django-json-widget-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8883a95d37b5a94322589fd4bbb4600890ac6fb91427b9f8f7b23c78d3f5a0f4
MD5 d48a4032d8613b67418a4d3ba0d27319
BLAKE2b-256 432a0ca97d2454777af4ce91a119122491a5829884bd39762d3cd2c7f5f9826e

See more details on using hashes here.

File details

Details for the file django_json_widget-0.1.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for django_json_widget-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 9cffd2cd3bb67cb0e971585ac6dd2752215ca29129a5fcb39943b7877eeaeb5f
MD5 36393eb379ac3273f062df537278d2cc
BLAKE2b-256 d521983f11ee045d6cfec258e9151a2bba6000ff741aaa3ed50b19bdf85576db

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page