JSON Editor support for Django JSON Fields
Project description
Django JSON Editor Field
The Django JSON Editor field enhances Djangos JSON Field add adds a json-editor on top. You can use a JSON Schema to describe a form for the underlying JSON field. The input is then stored as JSON.
Usage
Add django_json_editor_field to your INSTALLED_APPS.
Use the field in your model:
from django_json_editor_field.fields import JSONEditorField
schema = {
"title": "My JSON Array of Objects",
"type": "array",
"format": "table",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
},
"start": {
"type": "string",
"format": "date",
},
"end": {
"type": "string",
"format": "date",
}
}
}
}
data = JSONEditorField(schema=schema)
json-editor has some options. You can set
them using the options argument to the JSONEditorField.
options = {
"theme": "bootstrap4",
"disable_collapse": True,
}
schema = {
...
}
data = JSONEditorField(schema=schema, options=options)
Internally, the schema gets added to the schema attribute of the options and only the options object gets passed on
to the json-editor. This means you can also define the schema as part of the options directly.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_json_editor_field-0.4.2.tar.gz.
File metadata
- Download URL: django_json_editor_field-0.4.2.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5fc03d649fc652b81a461ba84486113373e4a79b9cec7897e42c4ba0d23cadc3
|
|
| MD5 |
6efb119da240e2426a5a08fe01591dda
|
|
| BLAKE2b-256 |
8dc8ed0f8d83eacb2dcdffb1b459da511eb3d52e26737291a236f5d5f892ff7c
|
Provenance
The following attestation bundles were made for django_json_editor_field-0.4.2.tar.gz:
Publisher:
publish.yml on b1rger/django-json-editor-field
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_json_editor_field-0.4.2.tar.gz -
Subject digest:
5fc03d649fc652b81a461ba84486113373e4a79b9cec7897e42c4ba0d23cadc3 - Sigstore transparency entry: 169252811
- Sigstore integration time:
-
Permalink:
b1rger/django-json-editor-field@7e33a2bbc044ed9987f05e8eaf9185f62b790e23 -
Branch / Tag:
refs/tags/v0.4.2 - Owner: https://github.com/b1rger
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7e33a2bbc044ed9987f05e8eaf9185f62b790e23 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file django_json_editor_field-0.4.2-py3-none-any.whl.
File metadata
- Download URL: django_json_editor_field-0.4.2-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6b4c39b682338baaf0c7cec6fb661b049a82bef195d30745677045606d9226d
|
|
| MD5 |
00896e22ac8a1026e12b042e416bb1e6
|
|
| BLAKE2b-256 |
6eb4580de3389bb9e31abc89e4ef22f128316c216e3abb5014176c8aa9f099e5
|
Provenance
The following attestation bundles were made for django_json_editor_field-0.4.2-py3-none-any.whl:
Publisher:
publish.yml on b1rger/django-json-editor-field
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_json_editor_field-0.4.2-py3-none-any.whl -
Subject digest:
d6b4c39b682338baaf0c7cec6fb661b049a82bef195d30745677045606d9226d - Sigstore transparency entry: 169252815
- Sigstore integration time:
-
Permalink:
b1rger/django-json-editor-field@7e33a2bbc044ed9987f05e8eaf9185f62b790e23 -
Branch / Tag:
refs/tags/v0.4.2 - Owner: https://github.com/b1rger
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7e33a2bbc044ed9987f05e8eaf9185f62b790e23 -
Trigger Event:
workflow_dispatch
-
Statement type: