Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

django-jsonschema converts Django Forms into JSON Schema compatibile representations

Project Description


django-jsonschema converts Django Forms into JSON Schema compatibile representations


  • Python 2.6 or later
  • Django 1.4 or later


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
Release History

Release History

This version
History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-jsonschema-0.2.0.macosx-10.9-intel.exe (69.7 kB) Copy SHA256 Checksum SHA256 any Windows Installer Apr 5, 2014
django-jsonschema-0.2.0.tar.gz (5.0 kB) Copy SHA256 Checksum SHA256 Source Apr 5, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting