From ae9fcb7da03d1bf43f79bde020b6f90552dd2a04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Hertzog?= Date: Thu, 21 Jul 2016 10:45:17 +0200 Subject: [PATCH] Import python-django-jsonfield_1.0.1.orig.tar.gz [dgit import orig python-django-jsonfield_1.0.1.orig.tar.gz] --- LICENSE | 23 ++ MANIFEST.in | 6 + PKG-INFO | 227 ++++++++++++++++++ README.rst | 212 ++++++++++++++++ django_jsonfield.egg-info/PKG-INFO | 227 ++++++++++++++++++ django_jsonfield.egg-info/SOURCES.txt | 24 ++ .../dependency_links.txt | 1 + django_jsonfield.egg-info/top_level.txt | 1 + jsonfield/VERSION | 1 + jsonfield/__init__.py | 8 + jsonfield/fields.py | 169 +++++++++++++ jsonfield/forms.py | 31 +++ jsonfield/models.py | 0 jsonfield/templatetags/__init__.py | 0 jsonfield/templatetags/jsonify.py | 28 +++ jsonfield/tests/__init__.py | 2 + .../tests/jsonfield_test_app/__init__.py | 0 jsonfield/tests/jsonfield_test_app/forms.py | 16 ++ jsonfield/tests/jsonfield_test_app/models.py | 31 +++ jsonfield/tests/test_fields.py | 163 +++++++++++++ jsonfield/tests/test_forms.py | 62 +++++ jsonfield/utils.py | 44 ++++ jsonfield/widgets.py | 20 ++ setup.cfg | 5 + setup.py | 24 ++ tests.py | 49 ++++ 26 files changed, 1374 insertions(+) create mode 100644 LICENSE create mode 100644 MANIFEST.in create mode 100644 PKG-INFO create mode 100644 README.rst create mode 100644 django_jsonfield.egg-info/PKG-INFO create mode 100644 django_jsonfield.egg-info/SOURCES.txt create mode 100644 django_jsonfield.egg-info/dependency_links.txt create mode 100644 django_jsonfield.egg-info/top_level.txt create mode 100644 jsonfield/VERSION create mode 100644 jsonfield/__init__.py create mode 100644 jsonfield/fields.py create mode 100644 jsonfield/forms.py create mode 100644 jsonfield/models.py create mode 100644 jsonfield/templatetags/__init__.py create mode 100644 jsonfield/templatetags/jsonify.py create mode 100644 jsonfield/tests/__init__.py create mode 100644 jsonfield/tests/jsonfield_test_app/__init__.py create mode 100644 jsonfield/tests/jsonfield_test_app/forms.py create mode 100644 jsonfield/tests/jsonfield_test_app/models.py create mode 100644 jsonfield/tests/test_fields.py create mode 100644 jsonfield/tests/test_forms.py create mode 100644 jsonfield/utils.py create mode 100644 jsonfield/widgets.py create mode 100644 setup.cfg create mode 100644 setup.py create mode 100644 tests.py 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