Metadata-Version: 1.1
Name: django-jsonschema
Version: 0.2.0
Summary: django-jsonschema converts Django Forms into JSON Schema compatibile representations
Home-page: http://github.com/celerityweb/django-jsonschema
Author: Jason Kraus
Author-email: zbyte64@gmail.com
License: New BSD License
Description: 
        ============
        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
        
Keywords: django json schema
Platform: UNKNOWN
Classifier: Programming Language :: Python
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Operating System :: OS Independent
Classifier: Natural Language :: English
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
