{"id":8952,"library":"django-jsoneditor","title":"Django JSON Editor","description":"Django-JSONEditor is an online structured JSON input widget for Django that enhances the editing experience for various JSONField implementations. It integrates the core JSONEditor JavaScript library (from jsoneditoronline.org) into Django's admin interface and forms. The library is currently at version 0.2.4, with its last release in February 2023, and shows an active but somewhat dated approach to JSON editing within the Django ecosystem, with discussions around newer alternatives.","status":"active","version":"0.2.4","language":"python","source_language":"en","source_url":"https://github.com/nnseva/django-jsoneditor","tags":["django","json","editor","admin","widget","jsonfield"],"install":[{"cmd":"pip install django-jsoneditor","lang":"bash","label":"Install stable version from PyPI"}],"dependencies":[{"reason":"Core framework integration.","package":"Django"},{"reason":"Provides the underlying JSONField functionality for Django >= 1.9; django-jsoneditor provides the widget only. Can also be a third-party JSONField.","package":"django.contrib.postgres.fields.JSONField","optional":true}],"imports":[{"wrong":"from jsoneditor import JSONEditor","symbol":"JSONEditor","correct":"import jsoneditor"}],"quickstart":{"code":"# settings.py\nINSTALLED_APPS = [\n    # ...\n    'django.contrib.admin',\n    'django.contrib.auth',\n    'django.contrib.contenttypes',\n    'django.contrib.sessions',\n    'django.contrib.messages',\n    'django.contrib.staticfiles',\n    'jsoneditor', # Add this line\n    # ...\n]\n\n# models.py (Example using Django's native JSONField)\nfrom django.db import models\n\nclass MyModel(models.Model):\n    name = models.CharField(max_length=255)\n    data = models.JSONField(default=dict)\n\n    def __str__(self):\n        return self.name\n\n# admin.py\nfrom django.contrib import admin\nfrom django.db import models\nfrom .models import MyModel\nfrom jsoneditor.forms import JSONEditor\n\n@admin.register(MyModel)\nclass MyModelAdmin(admin.ModelAdmin):\n    formfield_overrides = {\n        models.JSONField: {'widget': JSONEditor},\n    }\n","lang":"python","description":"To quickly integrate `django-jsoneditor` into your Django admin, add `jsoneditor` to your `INSTALLED_APPS` and then override the default widget for `JSONField` in your `admin.py` using `formfield_overrides`. Ensure you have an appropriate `JSONField` defined in your model, such as `django.db.models.JSONField` (for Django 3.1+ or with PostgreSQL) or a compatible third-party `JSONField`."},"warnings":[{"fix":"Ensure your model's JSON field is defined using `django.db.models.JSONField` or a compatible alternative like `django-jsonfield`.","message":"This library only provides a widget for editing JSON data. It does NOT provide a `JSONField` itself. You must use Django's built-in `django.db.models.JSONField` (available from Django 3.1+, or with `django.contrib.postgres` for older versions) or a compatible third-party `JSONField` package.","severity":"gotcha","affected_versions":"All versions"},{"fix":"For basic use cases, this may not be an issue. For highly interactive, large-document, or modern UI needs, consider evaluating `django-svelte-jsoneditor` or other alternatives.","message":"The underlying JavaScript JSON Editor library (which uses the Ace editor) is considered by some to be 'out-of-date' and can experience issues with very large JSON documents (e.g., crashing, reverting to `TextArea` in read-only mode). Newer alternatives like `django-svelte-jsoneditor` exist.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Refer to the GitHub README's 'Custom JSONEditor initialization' section for detailed steps on setting `JSON_EDITOR_INIT_JS` and modifying the `init.js` file.","message":"Customizing the JSON Editor's JavaScript initialization (e.g., setting default modes or options) requires copying the library's `init.js` file to your static storage and configuring `JSON_EDITOR_INIT_JS` in your Django settings to point to your modified copy.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"search_vec":"'0.2.4':47 '2023':54 'activ':58 'admin':37,78 'altern':74 'approach':62 'around':72 'core':28 'current':44 'date':61 'discuss':71 'django':1,5,15,35,68,75 'django-jsoneditor':4 'ecosystem':69 'edit':19,65 'editor':3,77 'enhanc':17 'experi':20 'februari':53 'form':40 'implement':24 'input':12 'integr':26 'interfac':38 'javascript':30 'json':2,11,64,76 'jsoneditor':6,29 'jsoneditoronline.org':33 'jsonfield':23,80 'last':50 'librari':31,42 'newer':73 'onlin':9 'releas':51 'show':56 'somewhat':60 'structur':10 'various':22 'version':46 'widget':13,79 'within':66","created_at":"2026-04-16T18:47:42.397824+00:00","updated_at":"2026-04-16T18:47:42.397824+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.2.4","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/nnseva/django-jsoneditor","docs":null,"changelog":null,"pypi":"https://pypi.org/project/django-jsoneditor/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["web-framework","database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-08-02","install_tag":null}}