Skip to main content

Introduction

django-jsonschema converts Django Forms into JSON Schema compatibile representations

Requirements

  • Python 2.6 or later

  • Django 1.4 or later

Usage

To convert a form to a JSON Schema:

from djangojsonschema.jsonschema import DjangoFormToJSONSchema

schema_repr = DjangoFormToJSONSchema().convert_form(MyForm)

To embed a JSON Schema as a form field:

from djangojsonschema.forms import JSONSchemaField

#where schema is a python dictionay like schema_repr in the first exmaple

class MyForm(forms.Form):
    subfield = JSONSchemaField(schema=schema)

form = MyForm(data={'subfield':'<json encoded value>'})
form.validate() #will validate the subfield entry against schema
form['subfield'].as_widget() #will render a textarea widget with a data-schemajson attribute

Metadata

Release files for django-jsonschema 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-jsonschema 0.2.0
File Size Uploaded Provenance Actions
django-jsonschema-0.2.0.tar.gz 5.0 kB Without provenance Details for django-jsonschema-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-jsonschema 0.2.0
File Interpreter ABI Platform Actions
django-jsonschema-0.2.0.macosx-10.9-intel.exe Details for django-jsonschema-0.2.0.macosx-10.9-intel.exe

Total release size: 74.7 kB

Release files / django-jsonschema-0.2.0.tar.gz

Download URL django-jsonschema-0.2.0.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b9151cb70d031dcd2d53a7f0dfc8c2a20ec3bef5be8fa78cce18b42d27cdce54
BLAKE2b-256 checksum
How to use checksums
902ad0aa5033df08ac913a04edc5c2670b6bf530a33551a0cf5de37646630c2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / django-jsonschema-0.2.0.macosx-10.9-intel.exe

Download URL django-jsonschema-0.2.0.macosx-10.9-intel.exe
Size 69.7 kB
Tags Source
SHA-256 checksum
How to use checksums
559c3cbf03fa0e725e392cd81832d43113693f58859b0a8238938129cb158214
BLAKE2b-256 checksum
How to use checksums
be5a3cbf44bb3315893e6e03f60763059c7b09d41189a82c7cd1e81fae35e2ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for django-jsonschema 0.2.0

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.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page