Django-jsonform

Latest version: v2.23.1

Safety actively analyzes 688792 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 5 of 8

2.13.0

Oct 09, 2022

This release brings some minor but important changes.

Like the previous version, it also supports `Django >= 2.0` and `Python >= 3.4`.

Breaking changes

- **Widget template**
This concerns you **if you've overridden the widget's template** in your projects.
There have been a lot of changes to the template. Please [take a look at the updated template](https://github.com/bhch/django-jsonform/blob/eaf03c7e8c2fd039eb772b2a244b81d7bc142d91/django_jsonform/templates/django_jsonform/editor.html).
The context variables sent by the widget have also been renamed. [Take a look at
the updated context variables](https://github.com/bhch/django-jsonform/blob/eaf03c7e8c2fd039eb772b2a244b81d7bc142d91/django_jsonform/widgets.py#L43-L68).
- **`JSONFormWidget` class**
This concerns you **if you've subclassed the `JSONFormWidget` class** in your projects.
Specifically, the context variables returned by the `render` method of widget have
been changed/renamed. [Take a look at the updated render method](https://github.com/bhch/django-jsonform/blob/eaf03c7e8c2fd039eb772b2a244b81d7bc142d91/django_jsonform/widgets.py#L43-L68).

New features

- **Support for django-nested-admin**
Support for [django-nested-admin](https://github.com/theatlantic/django-nested-admin) is added. Code contributed by [Trent Holliday](https://github.com/trumpet2012).

Bugfixes

- Some bugfixes in widget's JavaScript library.

react-json-form (JavaScript)

[react-json-form](https://github.com/bhch/react-json-form) has been updated to version 2.2.0.

Thank you

I want to thank all the people who contributed code, bug reports, feature requests and improvement suggestions.

2.12.0

Sep 17, 2022

This release brings some exciting new features and a few bugfixes and improvements.

Like the previous version, it also supports `Django >= 2.0` and `Python >= 3.4`.

New features

- **Data validation**
Support for [data validation](https://django-jsonform.readthedocs.io/en/latest/guide/validation.html).
- **Validation keywords**
Support for validation keywords — `required`, `minLength`, `maxLength`, `minimum`,
`maximum`, `exclusiveMinimum`, `exclusiveMaximum`, `uniqueItems`.
- **Autocomplete widget**
New [autocomplete widget](https://django-jsonform.readthedocs.io/en/latest/guide/autocomplete.html) which can load choices via AJAX requests.
- **File deletion**
A delete button has been added in Media Library thumbnails which will send a
`DELETE` request to file handler endpoint. In addition to that, `DELETE`
requests will automatically be sent to the server when *Clear* button is clicked
or when exiting page without form submission.

- **Rename choices `label` keyword to `title`**
For consistency with JSON schema, choice `label` keyword has been renamed to
`title`. However, the `label` keyword will still continue to work.

- **Range input**
Support for range input widget. Earlier range input was added using the `format`
keyword, but as a range input also returns a number value (no need for a specialised format).
Hence, it didn't make sense to use range as a format. So, now range inputs can
be created using the `widget` keyword.

- **Time widget improvements**
Time widget's input spinner is now circular i.e. after reaching maximum or minimum
value, it will start over (e.g. after 12 for hours, it will go to 0 if the hour is
incremented and will go from 0 to 12 if decremented).

Bugfixes

- 58: Overriding the widget in custom form's `Meta` class was not respected.
- 61: Widget didn't accept `attrs` argument.
- Minor improvements and fixes in widget's CSS.

react-json-form (JavaScript)

[react-json-form](https://github.com/bhch/react-json-form) has been updated to version 2.1.0.

Thank you

Thanks to all the people who contributed bug reports, feature requests and improvement suggestions.

2.11.1

Aug 30, 2022

This is a minor release.

What's new

Bugfixes

- 54: Multiselect widget didn’t work with integer types.

react-json-form (JavaScript)

[react-json-form](https://github.com/bhch/react-json-form) has been updated to version 2.0.2.

2.11.0

Aug 16, 2022

This release brings plenty of bugfixes, some exciting new features and some deprecations.

Like the previous version, it also supports `Django >= 2.0` and `Python >= 3.4`.


What's new

Deprecation notice

- **`JSONFORM_UPLOAD_HANDLER`**
The `JSONFORM_UPLOAD_HANDLER` setting has been deprecated and will be removed
in future.
Please read about the new way to upload files in the [Uploading files](https://django-jsonform.readthedocs.io/en/stable/guide/upload.html#file-url) document.

New features

- Brand new [JavaScript API](https://django-jsonform.readthedocs.io/en/stable/guide/javascript.html) for controlling the widget in the browser.
- Interactive playground: https://bhch.github.io/react-json-form/.
- New [file upload modal dialog](https://django-jsonform.readthedocs.io/en/stable/guide/upload.html#file-url) which provides the ability to browse files form the server while uploading.
- Support for `enum` keyword (alias for `choices`).
- Support for `placeholder` keyword.
- Support for `date-time` keyword (alias for `datetime`).
- Support for `handler` keyword for string input. This can be used for specifying the url for the file upload handler on a per input field basis.
- `JSONField` now accepts a new parameter called `file_handler` which can be used for specifying the url of the file handler on a per widget basis.
- Now django-jsonform settings will be namespaced under [`DJANGO_JSONFORM`](https://django-jsonform.readthedocs.io/en/stable/settings.html) setting.

Bugfixes

- 45: Default value for number and boolean types was ignored if the default value was 0 or False.
- 46: Fixed a bug due to which the multiselect widget didn't work on top-level arrays.
- 47: Fixed a bug in CSS when two widget fields were displayed in a single fieldset row.
- 48: Array's `minItems` keyword was ignored if default value for array was provided or if the form field had initial data.
- Fixed a bug to make select input respect falsy options. Earlier, the select input would not update the selected value if a falsy option was selected.
- Minor improvements and fixes in widget's CSS.

react-json-form (JavaScript)

[react-json-form](https://github.com/bhch/react-json-form) has been updated to version 2.0.0.

---

Finally, huge thanks to...

- All my sponsors for their support. I really appreciate it.
- All the people for contributing bug reports and improvement suggestions.

2.10.1

June 10, 2022

django-jsonform v2.10.1 fixes a "high" severity security vulnerability which affects all previous versions.

XSS (Cross Site Scripting) vulnerability in the admin form

django-jsonform stores the raw JSON data of the database field in a hidden `textarea` on the admin page.

However, that data was kept in the `textarea` after unescaping it using the `safe` template filter. This opens up possibilities for XSS attacks.

This only affects the admin pages where the django-jsonform is rendered.

2.10.0

Not secure
June 03, 2022

This release brings some exciting new features while remaining fully backwards-compatible with the previous release (2.9.x).

Like the previous version, it also supports `Django >= 2.0` and `Python >= 3.4`.

What's new

New features

- **`additionalProperties`**
Now `additionalProperties` key can have a sub-schema of its own. Earlier, additional keys could only be of string type. But now additional keys can be anything. It also supports referencing other schema.
- **Referencing and recursion**
Now you can use the `$ref` keyword to reference and reuse other parts of the schema. This means you can even recursively nest an object into itself. Support for the `$defs` keyword has also been added so that you can declare common schema snippets in one place for reusing.
- **`JSONField`**
`JSONField` now accepts a new parameter called **`pre_save_hook`** which can be used to process or transform the JSON data before saving.

Minor improvements
- 38: If an array has minItems set to 0 or undefined, it will be kept blank initially. If it has a default value, it will use the default value instead of being blank. Earlier, an empty item was automatically added to an array which could be undesirable in many cases.

react-json-form (JavaScript)

[react-json-form](https://github.com/bhch/react-json-form) has been updated to version 1.12.1.

Page 5 of 8

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.