Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

A simple Django app to add JSON widget into Django Administration.

Project description

# Django Administration JSON Editor

[![Build Status](](

![Admin Json Editor](example/example.png)

Application adds support for editing JSONField in Django Administration via

## Quick start

Install application via pip:

pip install django-admin-json-editor

Add application to the INSTALLED_APPS settings:


Define schema of json field:

'type': 'object',
'title': 'Data',
'properties': {
'text': {
'title': 'Some text',
'type': 'string',
'format': 'textarea',
'status': {
'title': 'Status',
'type': 'boolean',

Use JSONEditorWidget to bind editor to the form field:

class JSONModelAdminForm(forms.ModelForm):
class Meta:
model = JSONModel
fields = '__all__'
widgets = {
'data': JSONEditorWidget(DATA_SCHEMA, collapsed=False),

### Dynamic schema

It is possible to build dynamic schema for widget:

def dynamic_schema(widget):
return {
'type': 'array',
'title': 'tags',
'items': {
'type': 'string',
'enum': [i for i in Tag.objects.values_list('name', flat=True)],

class JSONModelAdmin(admin.ModelAdmin):
def get_form(self, request, obj=None, **kwargs):
widget = JSONEditorWidget(dynamic_schema, False)
form = super().get_form(request, obj, widgets={'tags': widget}, **kwargs)
return form

Project details

Download files

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

Files for django-admin-json-editor, version 0.2.0
Filename, size File type Python version Upload date Hashes
Filename, size django-admin-json-editor-0.2.0.tar.gz (941.8 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page