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
440 stars 88 forks source link

JSONEditor library not loaded in form assets #55

Closed bendavis78 closed 3 years ago

bendavis78 commented 3 years ago

When using the JSONEditor widget on a basic modelform (non-admin page), the JSONEditor library is not loaded, resulting in the following javascript error:

Uncaught ReferenceError: JSONEditor is not defined
AnderUstarroz commented 3 years ago

yes, same problem here, current version seems to be broken.

AnderUstarroz commented 3 years ago

Actually.. seems like it could be fixed just by adding this within your Django settings.py:

JSON_EDITOR_CSS = 'dist/jsoneditor.min.css'
JSON_EDITOR_JS = 'dist/jsoneditor.min.js'
kevindice commented 3 years ago

Yup - same here after bumping 1.0.1 to 1.10.

Looks like #53 and #52 both fix this.

StevenMapes commented 3 years ago

Yeah this is fixed in v1.1.1 - https://github.com/jmrivas86/django-json-widget/releases/tag/v1.1.1

kevindice commented 3 years ago

Thanks!

jmrivas86 commented 3 years ago

Fixed in version 1.1.1 by @StevenMapes 👏 in https://github.com/jmrivas86/django-json-widget/pull/52