django_remote_jsonschema_forms
A package that allows you to serialize django forms, including fields and widgets into Python dictionary for easy conversion into JSON Schema.
This way one can expose a django form using the JSON Schema standard.
These forms can be then rendered using JS libraries like react-jsonschema-form.
This package is heavily based on django-remote-forms, which we have used as an example.
We have changed the output format that django-remote-forms provides and return a JSON Schema compatible format.
Usage
Say you have a django form like this one:
from django.db import models
from django import forms
class Task(models.Model):
text = models.TextField("Text")
email = models.TextField("Text")
class MyForm(forms.ModelForm):
class Meta:
model = Task
You can create a view to expose it in JSON Schema like this:
from .forms import MyForm
from django_remote_jsonschema_forms.forms import RemoteJSONSChemaForm
from django.http import JsonResponse
def json_schema_form_view(request):
form = MyForm()
remote_form = RemoteJSONSChemaForm(form)
return JsonResponse(remote_form.as_dict())
Remember that you will need to register a url in urls.py to expose it.
Metadata
Release files for django-remote-jsonschema-forms 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django_remote_jsonschema_forms-1.0.1.tar.gz | 8.6 kB | Without provenance | Details for django_remote_jsonschema_forms-1.0.1.tar.gz |
Release files / django_remote_jsonschema_forms-1.0.1.tar.gz
| Download URL | django_remote_jsonschema_forms-1.0.1.tar.gz |
|---|---|
| Size | 8.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4b21e1826eeaf17320b14ba28e73726f1a6ab312557fea87f47866e7238555ab
|
|
BLAKE2b-256 checksum How to use checksums |
d24955aedb049aca45aba67be840b214f383178a8f26eb785fbf0a54cbf29f90
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.3
|
Security for django-remote-jsonschema-forms 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.