jmrivas86 / django-json-widget

An alternative widget that makes it easy to edit the new Django's field JSONField (PostgreSQL specific model fields)
MIT License
433 stars 88 forks source link

Widget doesn't work with boolean values #90

Open h4nz11 opened 2 months ago

h4nz11 commented 2 months ago

Description

The widget doesn't display data if the JSONField contains a boolean value. It throws a javascript exception:

Uncaught ReferenceError: True is not defined
    at change/:982:186
    at change/:984:7

Loaded data in HTML:

var json = {'label': 'Metered consumption - house', 'category': 'consumption', 'convertToNegative': True};