--- id: django-prettyjson version: "0.4.1" license: BSD license_treatment: permissive maintenance: aging --- # django-prettyjson — Enables pretty JSON viewer in Django forms, admin, or templates License: permissive · Maintenance: aging · Downloads: 178.8K/mo ## What it is and what it does django-prettyjson is a Django app that wraps JSON data in an interactive, collapsible viewer for use in forms, admin pages, and templates. It adapts jQuery JSONView to render JSON with syntax highlighting and tree-style navigation, letting users expand and collapse nested objects and arrays. The viewer works with JSON strings, Django's JSONField (from both django.contrib.postgres and the third-party django-jsonfield package), and any Python object serializable to JSON. You install it as a Django app, then use the PrettyJSONWidget in your form or admin class, or call the prettyjson template tag in your templates. The widget can render JSON as raw text with a toggle button, or as parsed JSON by default. It includes jQuery (namespaced to avoid conflicts) and CSS for styling, though you can disable jQuery loading if your page already includes it. Use it for: - Display JSON data in Django admin for models storing JSON fields, making it easier to inspect nested structures. - Render API response payloads or configuration objects as collapsible trees in forms or detail pages. - Visualize QuerySets or Python dicts as JSON in templates without writing custom JavaScript. - Allow end users to review and edit JSON data in admin forms with visual structure guidance. - Debug and inspect complex JSON documents in development by toggling between raw and parsed views. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Adds a collapsible, interactive JSON viewer widget to Django forms, admin interfaces, and templates, rendering JSON data with syntax highlighting and expandable tree navigation. No, not for new projects. The package has no known vulnerabilities and low install friction, but it has not been updated since 2018 and declares support only for Django 1.8–1.9 and Python 2.7, 3.4–3.5—all out of support. While the core functionality may still work on modern Django, there is no maintenance signal, no test confirmation, and no indication the author is actively supporting it. For modern Django projects, consider alternatives or fork and update this package yourself if you need this specific widget. ## Install pip install django-prettyjson uv add django-prettyjson poetry add django-prettyjson ## Installing django-prettyjson Before you install: Low install friction with no runtime dependencies. The package is aging—last release was 2018-08-07 and the repository shows no recent activity despite being unarchived. Classifiers indicate support for Django 1.8–1.9 and Python 2.7, 3.4–3.5, which are well out of support. License in practice: Licensed under BSD (permissive), so you can use, modify, and distribute the package freely in commercial and open-source projects with minimal restrictions. Quickstart: pip install django-prettyjson # In settings.py INSTALLED_APPS = [ ..., 'prettyjson', ] # In a form or admin from prettyjson import PrettyJSONWidget from django import forms class MyForm(forms.ModelForm): class Meta: widgets = {'json_field': PrettyJSONWidget()} Requires Django to be installed and configured; the package's stated support is for Django 1.8–1.9, which are no longer maintained. Verify before relying: - Whether the package works with modern Django versions (3.x, 4.x, 5.x) despite classifiers listing only 1.8–1.9. - Whether the jQuery JSONView adapter it uses remains compatible with current browser standards and jQuery versions. - Current test coverage and whether tests pass on modern Python and Django versions. ## Package facts - License: BSD (permissive) - Python support: unspecified - Install friction: low - Maintenance: aging - Downloads: 178.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags django json viewer widget, pretty json display django, json form field visualization, django admin json viewer, collapsible json renderer, django template json display, json syntax highlighting django, django-admin, json-viewer, ui-widget [View on SkillFed](https://skillfed.io/packages/django-prettyjson) · [View on PyPI](https://pypi.org/project/django-prettyjson/)