Metadata-Version: 2.0
Name: structjsonfield
Version: 0.1.4
Summary: Adding more structure to JSONFields
Home-page: https://github.com/tleguijt/structjsonfield
Author: Tim Leguijt
Author-email: info@leguijtict.nl
License: BSD
Keywords: structjsonfield
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: Django
Classifier: Framework :: Django :: 1.9
Classifier: Framework :: Django :: 1.10
Classifier: Framework :: Django :: 1.11
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Software Development :: Libraries :: Python Modules

=============================
Django Structured JSONField
=============================

.. image:: https://badge.fury.io/py/structjsonfield.svg
    :target: https://badge.fury.io/py/structjsonfield

.. image:: https://travis-ci.org/tleguijt/structjsonfield.svg?branch=master
    :target: https://travis-ci.org/tleguijt/structjsonfield

.. image:: https://codecov.io/gh/tleguijt/structjsonfield/branch/master/graph/badge.svg
    :target: https://codecov.io/gh/tleguijt/structjsonfield

Adding more structure to JSONFields

Documentation
-------------

The full documentation is at https://structjsonfield.readthedocs.io.

Quickstart
----------

Install Django Structured JSONField::

    pip install structjsonfield

Add it to your `INSTALLED_APPS`:

.. code-block:: python

    INSTALLED_APPS = (
        ...
        'structjsonfield',
        ...
    )

Use the StructJSONField in your form

.. code-block:: python

    from structjsonfield import StructJSONField


    ingredients = StructJSONField(
        structure={
            'name': forms.CharField(label=_('Name')),
            'amount': forms.CharField(label=_('Amount')),
            'units': forms.CharField(label=_('Units'))
        })

Prerequisites
-------------

* Make sure you have jQuery loaded in your template
* Make sure you load the necessary form media (js + css)

Features
--------

* TODO

Running Tests
-------------

Does the code actually work?

::

    source <YOURVIRTUALENV>/bin/activate
    (myenv) $ pip install tox
    (myenv) $ tox




History
-------

0.1.4 (2017-06-20)
++++++++++++++++++

* Added ability to disable specific columns
* Added support for BooleanFields (checkboxes) as widget

0.1.3 (2017-06-15)
++++++++++++++++++

* Fixed issue with disabled fields; given value is already JSON instead of a string

0.1.2 (2017-06-14)
++++++++++++++++++

* Localized validation error messages

0.1.1 (2017-05-15)
++++++++++++++++++

* Return unpacked rows as Columns to provide more context to the template

0.1.0 (2017-04-26)
++++++++++++++++++

* First release on PyPI.


