{ "info": { "author": "Jos\u00e9 Manuel Rivas", "author_email": "jmrivas86@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Framework :: Django", "Framework :: Django :: 1.11", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "=============================\ndjango-json-widget-copy\n=============================\n\n.. image:: https://badge.fury.io/py/django-json-widget.svg\n :target: https://badge.fury.io/py/django-json-widget\n\n.. image:: https://travis-ci.org/jmrivas86/django-json-widget.svg?branch=master\n :target: https://travis-ci.org/jmrivas86/django-json-widget\n\n.. image:: https://codecov.io/gh/jmrivas86/django-json-widget/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/jmrivas86/django-json-widget\n\nAn alternative widget that makes it easy to edit the new Django's field JSONField (PostgreSQL specific model fields)\n\n\nQuickstart\n----------\n\nInstall django-json-widget::\n\n pip install django-json-widget\n\nAdd it to your `INSTALLED_APPS`:\n\n.. code-block:: python\n\n INSTALLED_APPS = (\n ...\n 'django_json_widget',\n ...\n )\n\nAdd the widget in your admin.py:\n\n.. code-block:: python\n\n from django.contrib import admin\n from django.contrib.postgres import fields\n from django_json_widget.widgets import JSONEditorWidget\n from .models import YourModel\n\n\n @admin.register(YourModel)\n class YourModelAdmin(admin.ModelAdmin):\n formfield_overrides = {\n fields.JSONField: {'widget': JSONEditorWidget},\n }\n\nYou can also add the widget in your forms.py:\n\n.. code-block:: python\n\n from django import forms\n from django_json_widget.widgets import JSONEditorWidget\n from .models import YourModel\n\n\n class YourForm(forms.ModelForm):\n class Meta:\n model = YourModel\n\n fields = ('jsonfield',)\n\n widgets = {\n 'jsonfield': JSONEditorWidget\n }\n\nConfiguration\n-------------\n\nYou can customize the JSONEditorWidget with the following options:\n\n* **width**: Width of the editor as a string with CSS size units (px, em, % etc). Defaults to ``90%``.\n* **height**: Height of the editor as a string CSS size units. Defaults to ``550px``.\n* **options**: A dict of options accepted by the `JSON editor`_. Options that require functions (eg. onError) are not supported. \n* **mode (deprecated)**: The default editor mode. This argument is redundant because it can be specified as a part of ``options``. Preserved for backwards compatibility with version 0.2.0.\n* **attrs**: HTML attributes to be applied to the wrapper element. See the `Django Widget documentation`_.\n\n.. _json editor: https://github.com/josdejong/jsoneditor/blob/master/docs/api.md#configuration-options\n.. _Django Widget documentation: https://docs.djangoproject.com/en/2.1/ref/forms/widgets/#django.forms.Widget.attrs\n\n\nJSONEditorWidget widget\n-----------------------\n\nBefore:\n\n.. image:: https://raw.githubusercontent.com/jmrivas86/django-json-widget/master/imgs/jsonfield_0.png\n\nAfter:\n\n.. image:: https://raw.githubusercontent.com/jmrivas86/django-json-widget/master/imgs/jsonfield_1.png\n\n\nCredits\n-------\n\nTools used in rendering this package:\n\n* Cookiecutter_\n* `cookiecutter-djangopackage`_\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`cookiecutter-djangopackage`: https://github.com/pydanny/cookiecutter-djangopackage\n\n\n\n\nHistory\n-------\n\n0.1.0 (2017-05-10)\n++++++++++++++++++\n\n* First release on PyPI.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jmrivas86/django-json-widget", "keywords": "django-json-widget-copy", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "django-json-widget-copy", "package_url": "https://pypi.org/project/django-json-widget-copy/", "platform": "", "project_url": "https://pypi.org/project/django-json-widget-copy/", "project_urls": { "Homepage": "https://github.com/jmrivas86/django-json-widget" }, "release_url": "https://pypi.org/project/django-json-widget-copy/0.2.0/", "requires_dist": null, "requires_python": "", "summary": "Django json widget is an alternative widget that makes it easy to edit the jsonfield field of django.", "version": "0.2.0", "yanked": false, "yanked_reason": null }, "last_serial": 6046543, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "c402043ae0d91afc01c239c7117e35df", "sha256": "c93f391a59e996d68463f90c334b47d069ea9ba440c99de0af132b6e9fba7b1d" }, "downloads": -1, "filename": "django-json-widget-copy-0.2.0.0.tar.gz", "has_sig": false, "md5_digest": "c402043ae0d91afc01c239c7117e35df", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 189913, "upload_time": "2019-10-29T11:02:17", "upload_time_iso_8601": "2019-10-29T11:02:17.906680Z", "url": "https://files.pythonhosted.org/packages/d2/6a/e07f7cb74752a6bbe657dd68c3a71ae841543860a84430fd4c208313495b/django-json-widget-copy-0.2.0.0.tar.gz", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c402043ae0d91afc01c239c7117e35df", "sha256": "c93f391a59e996d68463f90c334b47d069ea9ba440c99de0af132b6e9fba7b1d" }, "downloads": -1, "filename": "django-json-widget-copy-0.2.0.0.tar.gz", "has_sig": false, "md5_digest": "c402043ae0d91afc01c239c7117e35df", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 189913, "upload_time": "2019-10-29T11:02:17", "upload_time_iso_8601": "2019-10-29T11:02:17.906680Z", "url": "https://files.pythonhosted.org/packages/d2/6a/e07f7cb74752a6bbe657dd68c3a71ae841543860a84430fd4c208313495b/django-json-widget-copy-0.2.0.0.tar.gz", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }