Releases: bhch/django-jsonform
Version 2.16.1
django-jsonform 2.16.1 release notes
Mar 28, 2023
This is a small patch release.
Bugfixes
- #96: Fixed a bug in
required
properties in nested objects.
react-json-form (JavaScript)
react-json-form has been updated to version 2.7.2.
Version 2.16.0
django-jsonform 2.16.0 release notes
Mar 25, 2023
This release brings some new features and some bug fixes.
Like the previous version, it also supports Django >= 2.0
and Python >= 3.4
.
New features
oneOf
,anyOf
,allOf
Support foroneOf
,anyOf
andallOf
has been added. See Docs.- Required properties
Support forrequired
keyword for object properties. - Dark mode
Support for dark mode.
Bugfixes
- #92: Fixed validation for
choices
. - #94 : Fixed a bug due to which
True
/False
were treated as valid numbers.
react-json-form (JavaScript)
react-json-form has been updated to version 2.7.1.
Thank you
I want to thank all the people who contributed code, bug reports, feature requests and improvement suggestions.
Version 2.15.0
django-jsonform 2.15.0 release notes
Nov 21, 2022
This release brings plenty of bug fixes and one breaking change.
Like the previous version, it also supports Django >= 2.0
and Python >= 3.4
.
New features
ErrorMap
A new helper class for setting error messages for custom validation.
Bugfixes
- #69: Allow hyphens in schema object keys.
- #70: Made the widget compatible with HTMX.
- #81: Fixed a bug due to which the error messages were not displayed under input fields.
- #82: Fixed a bug to display error messages from multiple validators.
- Minor fixes: #71, #73, #79.
Breaking changes
- Custom validation
Due to fixing issue #69 to allow hyphens (dashes) in schema object keys (i.e. field names), you should now use theErrorMap
helper class to construct theerror_map
object.
react-json-form (JavaScript)
react-json-form has been updated to version 2.4.0.
Thank you
I want to thank my sponsors and all the people who contributed code, bug reports, feature requests and improvement suggestions.
Version 2.14.0
django-jsonform 2.14.0 release notes
Nov 01, 2022
This release brings a small feature.
Like the previous version, it also supports Django >= 2.0
and Python >= 3.4
.
New features
- Overriding
file-url
input field
Usewidget: 'fileinput'
to display a simple file input field forfile-url
. It is useful in those cases where you don’t want to open a modal for choosing images.
react-json-form (JavaScript)
react-json-form has been updated to version 2.3.0.
Thank you
I want to thank my sponsors and all the people who contributed code, bug reports, feature requests and improvement suggestions.
Version 2.13.0
django-jsonform 2.13.0 release notes
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.
The context variables sent by the widget have also been renamed. Take a look at
the updated context variables. JSONFormWidget
class
This concerns you if you've subclassed theJSONFormWidget
class in your projects.
Specifically, the context variables returned by therender
method of widget have
been changed/renamed. Take a look at the updated render method.
New features
- Support for django-nested-admin
Support for django-nested-admin is added. Code contributed by Trent Holliday.
Bugfixes
- Some bugfixes in widget's JavaScript library.
react-json-form (JavaScript)
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.
Version 2.12.0
django-jsonform 2.12.0 release notes
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. -
Validation keywords
Support for validation keywords —required
,minLength
,maxLength
,minimum
,
maximum
,exclusiveMinimum
,exclusiveMaximum
,uniqueItems
. -
Autocomplete widget
New autocomplete widget 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 totitle
For consistency with JSON schema, choicelabel
keyword has been renamed to
title
. However, thelabel
keyword will still continue to work. -
Range input
Support for range input widget. Earlier range input was added using theformat
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 thewidget
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 has been updated to version 2.1.0.
Thank you
Thanks to all the people who contributed bug reports, feature requests and improvement suggestions.
Version 2.11.1
django-jsonform 2.11.1 release notes
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 has been updated to version 2.0.2.
Version 2.11.0
django-jsonform 2.11.0 release notes
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
TheJSONFORM_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 document.
New features
- Brand new JavaScript API for controlling the widget in the browser.
- Interactive playground: https://bhch.github.io/react-json-form/.
- New file upload modal dialog which provides the ability to browse files form the server while uploading.
- Support for
enum
keyword (alias forchoices
). - Support for
placeholder
keyword. - Support for
date-time
keyword (alias fordatetime
). - 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 calledfile_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
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 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.
Version 2.10.1
django-jsonform 2.10.1 release notes
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.
Version 2.10.0
django-jsonform 2.10.0 release notes
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
NowadditionalProperties
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 calledpre_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 has been updated to version 1.12.1.