commit ae9fcb7da03d1bf43f79bde020b6f90552dd2a04 Author: Raphaƫl Hertzog Date: Thu Jul 21 10:45:17 2016 +0200 Import python-django-jsonfield_1.0.1.orig.tar.gz [dgit import orig python-django-jsonfield_1.0.1.orig.tar.gz] diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d869f75 --- /dev/null +++ b/LICENSE @@ -0,0 +1,23 @@ +Copyright (c) 2012, Matthew Schinckel. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * The names of its contributors may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL MATTHEW SCHINCKEL BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..f62f0df --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,6 @@ +recursive-include jsonfield *.py +include jsonfield/VERSION +include README.rst +include tests.py +include LICENSE +recursive-exclude jsonfield *.pyc \ No newline at end of file diff --git a/PKG-INFO b/PKG-INFO new file mode 100644 index 0000000..1f309ef --- /dev/null +++ b/PKG-INFO @@ -0,0 +1,227 @@ +Metadata-Version: 1.1 +Name: django-jsonfield +Version: 1.0.1 +Summary: JSONField for django models +Home-page: http://bitbucket.org/schinckel/django-jsonfield/ +Author: Matthew Schinckel +Author-email: matt@schinckel.net +License: UNKNOWN +Description: django-jsonfield + =================== + + .. image:: https://codeship.com/projects/2e1a3d30-7db7-0132-629f-4abd151a3721/status?branch=default + + I had a serious need for a JSON field for django. There were a couple out + there, but none packaged up nicely on bitbucket/github that were usable + with ``pip install -e``. + + So I took the code from `David Cramer's blog`_, and packaged it up. + + Usage + ----- + + To use, just install the package, and then use the field:: + + from django.db import models + import jsonfield + + class MyModel(models.Model): + the_json = jsonfield.JSONField() + + You can assign any JSON-encodable object to this field. It will be + JSON-encoded before being stored in the database as a text value and it + will be turned back into a python list/dict/string upon retrieval from the + database. + + There is also a ``TypedJSONField``, that allows you to define data types that must be included within each object in the array. More documentation to follow. + + + Notes + ~~~~~ + + If no ``default`` is provided, and ``null=True`` is not passed in to the + field constructor, then a default of ``{}`` will be used. + + + Supported django versions + ------------------------- + + All versions of Django from 1.8 onwards are tested, however, if you are using Postgres, I highly recommend that you consider using the ``django.contrib.postgres`` module's ``JSONField`` instead. + + Extras + ------ + + jsonify templatetag + ~~~~~~~~~~~~~~~~~~~ + This allows you to convert a python data structure into JSON within a template:: + + {% load jsonify %} + + + + Note that you must only use the "safe" filter when you use the jsonify + filter within a + +Note that you must only use the "safe" filter when you use the jsonify +filter within a + + Note that you must only use the "safe" filter when you use the jsonify + filter within a