A better, user-friendly JSON editing form field for Django admin. Also supports Postgres ArrayField.
BSD-3-CLAUSE License
Bot releases are hidden (Show)
Published by bhch over 1 year ago
This release brings some new features and some bug fixes.
Like the previous version, it also supports Django >= 2.0
and Python >= 3.4
.
oneOf
, anyOf
, allOf
oneOf
, anyOf
and allOf
has been added. See Docs.required
keyword for object properties.choices
.True
/False
were treated as valid numbers.react-json-form has been updated to version 2.7.1.
I want to thank all the people who contributed code, bug reports, feature requests and improvement suggestions.
Published by bhch almost 2 years ago
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
.
ErrorMap
ErrorMap
helper class to construct the error_map
object.react-json-form has been updated to version 2.4.0.
I want to thank my sponsors and all the people who contributed code, bug reports, feature requests and improvement suggestions.
Published by bhch almost 2 years ago
This release brings a small feature.
Like the previous version, it also supports Django >= 2.0
and Python >= 3.4
.
file-url
input fieldwidget: 'fileinput'
to display a simple file input field for file-url
. It is useful in those cases where you don’t want to open a modal for choosing images.react-json-form has been updated to version 2.3.0.
I want to thank my sponsors and all the people who contributed code, bug reports, feature requests and improvement suggestions.
Published by bhch about 2 years ago
This release brings some minor but important changes.
Like the previous version, it also supports Django >= 2.0
and Python >= 3.4
.
JSONFormWidget
classJSONFormWidget
class in your projects.render
method of widget havereact-json-form has been updated to version 2.2.0.
I want to thank all the people who contributed code, bug reports, feature requests and improvement suggestions.
Published by bhch about 2 years ago
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
.
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 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).
Meta
class was not respected.attrs
argument.react-json-form has been updated to version 2.1.0.
Thanks to all the people who contributed bug reports, feature requests and improvement suggestions.
Published by bhch about 2 years ago
This is a minor release.
react-json-form has been updated to version 2.0.2.
Published by bhch about 2 years ago
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
.
JSONFORM_UPLOAD_HANDLER
JSONFORM_UPLOAD_HANDLER
setting has been deprecated and will be removedenum
keyword (alias for choices
).placeholder
keyword.date-time
keyword (alias for datetime
).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.DJANGO_JSONFORM
setting.minItems
keyword was ignored if default value for array was provided or if the form field had initial data.react-json-form has been updated to version 2.0.0.
Published by bhch over 2 years ago
django-jsonform v2.10.1 fixes a "high" severity security vulnerability which affects all previous versions.
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.
Published by bhch over 2 years ago
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
.
additionalProperties
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.$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.react-json-form has been updated to version 1.12.1.
Published by bhch over 2 years ago
This version introduces some backwards-incompatible changes with the previous versions related to CSS styling and internal HTML structure.
Like the previous version, it also supports Django >= 2.0
and Python >= 3.4
.
help_text
or helpText
keyword).react-json-form has been updated to version 1.11.0.
The internal HTML structure of the widget, i.e. how the the fields are rendered, has been changed. Due to this, some of the CSS code has also been changed.
You don’t need to worry about this unless you’ve written custom CSS styles for the widget. If so, this is something to beware of.
Published by bhch over 2 years ago
This is a minor release and is fully backwards compatible.
react-json-form has been updated to version 1.10.0.
Published by bhch over 2 years ago
This version introduces no breaking changes and is fully compatible with the previous releases (2.7.x).
Like the previous version, it also supports Django >= 2.0
and Python >= 3.4
.
Datetime input
Support for datetime input has been added for string
type fields using format: 'datetime'
key.
Read about its usage here: Datetime field.
Multiple choice selection
Support for multiple choice selection. Learn more in usage docs: Multiple selections.
Default value for array
Support for default
initial value for an array. Earlier, only array itemscould have a default value.
The problem with that is when a new item was added, the same default value was also added again.
With this feature, it is now possible to set multiple default values on an array.
Clearable file inputs
Now file upload inputs can be cleared, i.e. their value can be unset.
Earlier, it wasn't possible to empty a file input once a value was attached.
Callable schema may receive the model instance
Now the callable schema function may optionally receive the current model instance as an argument.
Autogrowing textarea
Textarea's height will now grow automatically as the user types in. This saves the user from having to manually resize the textarea.
Animated list items
List items will have a nice animation when moved up/down or removed. This will help provide some feedback to the user.
Earlier it wasn't obvious when list items were moved.
react-json-form has been updated to version 1.9.0 which brings most of the above listed features.
Published by bhch over 2 years ago
This version introduces no breaking changes and is fully compatible with the previous releases (2.6.x).
Like the previous version, it also supports Django >= 2.0
and Python >= 3.4
.
Published by bhch almost 3 years ago
This version introduces no breaking changes and is fully compatible with the previous releases (2.5.x).
Like the previous version, it also supports Django >= 2.0
and Python >= 3.4
.
default
can be used to specify default values for input fields.readonly
(alias readOnly
) can be used to make input fields readonly.react-json-form has been updated to version 1.7.1.
Published by bhch almost 3 years ago
This version introduces a breaking change from the previous releases.
Like the previous version, it also supports Django >= 2.0
and Python >= 3.4
.
react-json-form has been updated to version 1.6.0.
Earlier version used to set empty string (''
) for blank number inputs. This version will use null instead.
It will also change empty strings to null in the initial data as well.
Published by bhch almost 3 years ago
This version is fully backwards compatible with the previous version (v2.2.x).
Like the previous version, it also supports Django >= 2.0
and Python >= 3.4
.
react-json-form has been updated to version 1.5.2. This version fixes the bug related to choice inputs.
psycopg2
to be installed because of ArrayField
. Now, psycopg2
isn't required unless ArrayField
is used.Published by bhch about 3 years ago
This version is fully backwards compatible with the previous version (v2.2.x).
Like the previous version, it also supports Django >= 2.0
and Python >= 3.4
.
react-json-form has been updated to version 1.5.1. This version implements following new features and many bugfixes.
Now a textarea input can be specified for a string field using the widget keyword.
Array items can now be re-ordered using arrow buttons.
Published by bhch about 3 years ago
This is a minor release and adds no new features.
Published by bhch about 3 years ago
This version adds no new featurs and is fully backwards compatible.
Templates and static files weren’t included in the previous builds. This version includes all the required files.
Previous versions are not usable due to this embarrassing mistake.
Published by bhch about 3 years ago
This version is fully backwards compatible.
schema
schema
can now be a callable. This allows for specifying choices dynamically, among other things.
Improvements to the widget's CSS:
select
input wasn't the same width as other inputs.