Metadata-Version: 2.1
Name: django-json-editor-field
Version: 0.2.1
Summary: JSON Editor support for Django JSON Fields
License: MIT
Author: Birger Schacht
Author-email: birger.schacht@oeaw.ac.at
Requires-Python: >=3.10,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Description-Content-Type: text/markdown

# Django JSON Editor Field

The Django JSON Editor field enhances [Djangos JSON
Field](https://docs.djangoproject.com/en/stable/ref/models/fields/#django.db.models.JSONField)
add adds a [json-editor](https://github.com/json-editor/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.

# Installation

Add `django_json_editor_field` to your [INSTALLED_APPS](https://docs.djangoproject.com/en/stable/ref/settings/#std-setting-INSTALLED_APPS).

Use the field in your model:

```python
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)
```

