{"id":13465679,"url":"https://github.com/jmrivas86/django-json-widget","last_synced_at":"2025-03-25T16:32:43.271Z","repository":{"id":43212185,"uuid":"91264973","full_name":"jmrivas86/django-json-widget","owner":"jmrivas86","description":"An alternative widget that makes it easy to edit the new Django's field JSONField (PostgreSQL specific model fields)","archived":false,"fork":false,"pushed_at":"2024-04-11T11:56:55.000Z","size":765,"stargazers_count":432,"open_issues_count":20,"forks_count":88,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-09-18T17:13:09.747Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jmrivas86.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.rst","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-14T19:01:38.000Z","updated_at":"2024-09-10T03:37:16.000Z","dependencies_parsed_at":"2023-02-02T13:01:18.678Z","dependency_job_id":"f1122ce5-5197-4151-8612-5bf850dc0b91","html_url":"https://github.com/jmrivas86/django-json-widget","commit_stats":{"total_commits":58,"total_committers":15,"mean_commits":"3.8666666666666667","dds":0.5862068965517242,"last_synced_commit":"7526ee4cd346d821e275f700a24657fda70816cc"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmrivas86%2Fdjango-json-widget","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmrivas86%2Fdjango-json-widget/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmrivas86%2Fdjango-json-widget/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmrivas86%2Fdjango-json-widget/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jmrivas86","download_url":"https://codeload.github.com/jmrivas86/django-json-widget/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222088601,"owners_count":16928984,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T15:00:33.767Z","updated_at":"2024-10-29T17:31:25.588Z","avatar_url":"https://github.com/jmrivas86.png","language":"Python","funding_links":[],"categories":["Packages to install at your project","Python"],"sub_categories":["Widgets / Fields"],"readme":"=============================\ndjango-json-widget\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.db.models import JSONField\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            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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmrivas86%2Fdjango-json-widget","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjmrivas86%2Fdjango-json-widget","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmrivas86%2Fdjango-json-widget/lists"}