{ "info": { "author": "Dario Gomez-Tafur", "author_email": "certae.sm@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3.4", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Django-JSONField2 \n===================\n\n``django-json-field2`` is a flexible quering JSONField and associated form field\n\nIt is a compilation and adaptation of the following projects \n\n* https://bitbucket.org/schinckel/django-jsonfield \n* https://github.com/derek-schaefer/django-json-field\n* https://github.com/bradjasper/django-jsonfield\n* https://github.com/certae/django-softmachine/blob/master/src/protoLib/fields.py\n* https://github.com/frol/django-quering-jsonfield\n* http://cramer.io/2009/04/14/cleaning-up-with-json-and-sql/ \n* http://natebeacham.com/blog/nate-beacham/31/\n\n\nFeature\tDescription\n-------------------\nSouth support \t\nForm field\nForm widget\nModel field\nPython3 support\n\n\n``django-jsonfield2`` is also compatible with South, Django 1.8 and Python 3.\n\n\nInstallation\n------------\n\nInstall from PyPI:\n\n ``pip install django-jsonfield2``\n\n\nSource:\n-------\n\n ``git clone git://github.com/DarioGT/django-jsonfield2.git``\n\n\nConfiguration\n-------------\n\nAdd ``jsonfield2`` to your ``PYTHONPATH`` and ``INSTALLED_APPS`` setting:\n\n::\n\n INSTALLED_APPS = (\n ...\n 'jsonfield2',\n ...\n )\n\n::\n\nUsage\n-----\n\n::\n\n from django.db import models\n\tfrom jsonfield2 import JSONField, JSONAwareManager\n\n\tclass JsonModel(models.Model):\n\t code = models.CharField( blank=False, null=False, max_length=20 )\n\t status = models.CharField( blank=True, null=True, max_length=20 )\n\n\t info = JSONField(default={})\n\t \n\t objects = JSONAwareManager(json_fields = ['info'])\n\t \n\t def __str__(self):\n\t return self.code\n\n\nJson Query \n----------\n\n::\n\n ...\n obj = Person.objects.create(name = \"Bill\")\n obj.info = {\n 'sex': 'male',\n 'address': {\n 'country', 'Canada',\n }\n }\n obj.save()\n Person.objects.filter(info__address__country = 'Canada')\n >>> [Person: \"Bill\"]\n\n\n\nUsage\n-----\n\nNow, it will validate the JSON on entry, and store it as a text in the database. When you instantiate/fetch the object, it will be turned back into a python list/dict/string.\n\n\n\njsonify templatetag\n-------------------\nThis allows you to convert a python data structure into JSON within a template::\n\n {% load jsonify %}\n\n \n\n\nTests \n----------\n\n ``python runtest.py``\n\n\nTodo\n----------\n\nAllow order_by when json criteria are used \n\n\nLicense\n-------\n\n``django-jsonfield2`` is licensed under the New BSD license.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/DarioGT/django-jsonfield2", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "django-jsonfield2", "package_url": "https://pypi.org/project/django-jsonfield2/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-jsonfield2/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/DarioGT/django-jsonfield2" }, "release_url": "https://pypi.org/project/django-jsonfield2/15.06.08/", "requires_dist": null, "requires_python": null, "summary": "A flexible quering JSONField and associated form field to store validated JSON in your model.", "version": "15.06.08" }, "last_serial": 1582059, "releases": { "15.06.07": [ { "comment_text": "", "digests": { "md5": "4d98da15f8d16cd8b18ad85ec81b238a", "sha256": "b08c86c34028497a0ca19f7ef3d09604646b1997a3f0478ce1b8f5cf7a561455" }, "downloads": -1, "filename": "django_jsonfield2-15.06.07-py3.4.egg", "has_sig": false, "md5_digest": "4d98da15f8d16cd8b18ad85ec81b238a", "packagetype": "bdist_egg", "python_version": "3.4", "requires_python": null, "size": 30390, "upload_time": "2015-06-07T15:52:52", "url": "https://files.pythonhosted.org/packages/54/af/56fca21b5017e87549270a7717b9874894075bf165cc8c99787275f6f927/django_jsonfield2-15.06.07-py3.4.egg" }, { "comment_text": "", "digests": { "md5": "268fe044ea30b7cd4f6a10b5087bf69a", "sha256": "c08e1af3afb25ab2e95af35c39f73c1e1e06b41c8fd57d9547471b07d0221529" }, "downloads": -1, "filename": "django-jsonfield2-15.06.07.tar.gz", "has_sig": false, "md5_digest": "268fe044ea30b7cd4f6a10b5087bf69a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11084, "upload_time": "2015-06-07T15:52:20", "url": "https://files.pythonhosted.org/packages/25/43/90866f6a1e061ba84ed07329a0db02284d7357ebcb618798ce67fb142770/django-jsonfield2-15.06.07.tar.gz" } ], "15.06.08": [ { "comment_text": "", "digests": { "md5": "f1e931b5193b5f24b967ae96fddd6bdb", "sha256": "a1e6cdb322f704f5a8046e12e03a5358dad8d3074c0c014456da9e64aac2b187" }, "downloads": -1, "filename": "django_jsonfield2-15.06.08-py3.4.egg", "has_sig": false, "md5_digest": "f1e931b5193b5f24b967ae96fddd6bdb", "packagetype": "bdist_egg", "python_version": "3.4", "requires_python": null, "size": 30390, "upload_time": "2015-06-07T16:06:26", "url": "https://files.pythonhosted.org/packages/5a/2e/3d92c684b07a481ce3bbe06f53ae648b395024fc9a9651e4f0a2a5fff6b2/django_jsonfield2-15.06.08-py3.4.egg" }, { "comment_text": "", "digests": { "md5": "71fb75c70fee6f254f4d555aa8fd6afe", "sha256": "ba3f118a0bed1926ce6f6345a3c474863013a94e4b7dc7fe090be77c8c56a83d" }, "downloads": -1, "filename": "django-jsonfield2-15.06.08.tar.gz", "has_sig": false, "md5_digest": "71fb75c70fee6f254f4d555aa8fd6afe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11084, "upload_time": "2015-06-07T16:06:15", "url": "https://files.pythonhosted.org/packages/79/14/05110a746460c48b6b74630f84887761f5b1736c4d5b54a0c95191667d1d/django-jsonfield2-15.06.08.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f1e931b5193b5f24b967ae96fddd6bdb", "sha256": "a1e6cdb322f704f5a8046e12e03a5358dad8d3074c0c014456da9e64aac2b187" }, "downloads": -1, "filename": "django_jsonfield2-15.06.08-py3.4.egg", "has_sig": false, "md5_digest": "f1e931b5193b5f24b967ae96fddd6bdb", "packagetype": "bdist_egg", "python_version": "3.4", "requires_python": null, "size": 30390, "upload_time": "2015-06-07T16:06:26", "url": "https://files.pythonhosted.org/packages/5a/2e/3d92c684b07a481ce3bbe06f53ae648b395024fc9a9651e4f0a2a5fff6b2/django_jsonfield2-15.06.08-py3.4.egg" }, { "comment_text": "", "digests": { "md5": "71fb75c70fee6f254f4d555aa8fd6afe", "sha256": "ba3f118a0bed1926ce6f6345a3c474863013a94e4b7dc7fe090be77c8c56a83d" }, "downloads": -1, "filename": "django-jsonfield2-15.06.08.tar.gz", "has_sig": false, "md5_digest": "71fb75c70fee6f254f4d555aa8fd6afe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11084, "upload_time": "2015-06-07T16:06:15", "url": "https://files.pythonhosted.org/packages/79/14/05110a746460c48b6b74630f84887761f5b1736c4d5b54a0c95191667d1d/django-jsonfield2-15.06.08.tar.gz" } ] }