Django Prettyjson

screenshot of Django Prettyjson

Enables pretty JSON viewer in Django forms, admin, or templates

Overview

django-prettyjson is a package that enables a pretty JSON viewer in Django forms, admin, or templates. It allows you to easily visualize and manipulate JSON data in a user-friendly way. The viewer is adapted from jQuery JSONView and is compatible with various types of JSON data, including JSON stored in a string, jsonfield, or any Python object that can be serialized to JSON.

Features

  • Enables a pretty JSON viewer in Django forms, admin, or templates.
  • Compatible with JSON stored in a string, jsonfield, or Python objects.
  • Allows enabling a pretty JSON viewer for specific fields in forms or admin of a model.
  • Supports enabling a pretty JSON viewer for every JSONField of a model.
  • Provides a template tag for enabling a pretty JSON viewer in templates.
  • Includes CSS and JS files for styling and functionality of the viewer.
  • Includes the option to configure the rendering of the jsonwidget.
  • Can render the JSON data as a raw string initially or as parsed JSON.

Summary

django-prettyjson is a useful package for Django developers who need to work with JSON data. It provides a convenient way to view and manipulate JSON data in forms, admin pages, and templates. With its compatibility and customization options, it offers flexibility for handling different types of JSON data. The package also includes CSS and JS files for styling and functionality, making it easy to integrate and use in Django projects.