django-flat-json-widget
=======================
.. image:: https://github.com/openwisp/django-flat-json-widget/workflows/Django%20Flat%20JSON%20Widget%20CI%20Build/badge.svg?branch=master
:target: https://github.com/openwisp/openwisp-controller/actions?query=workflow%3A%22Django%20Flat%20JSON%20Widget%20CI%20Build%22
:alt: CI build status
.. image:: https://coveralls.io/repos/openwisp/django-flat-json-widget/badge.svg
:target: https://coveralls.io/r/openwisp/django-flat-json-widget
:alt: Test Coverage
.. image:: https://img.shields.io/librariesio/release/github/openwisp/django-flat-json-widget
:target: https://libraries.io/github/openwisp/django-flat-json-widget#repository_dependencies
:alt: Dependency monitoring
.. image:: https://img.shields.io/gitter/room/nwjs/nw.js.svg
:target: https://gitter.im/openwisp/general
:alt: Chat
.. image:: https://badge.fury.io/py/django-flat-json-widget.svg
:target: http://badge.fury.io/py/django-flat-json-widget
:alt: Pypi Version
.. image:: https://pepy.tech/badge/django-flat-json-widget
:target: https://pepy.tech/project/django-flat-json-widget
:alt: Downloads
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://pypi.org/project/black/
:alt: code style: black
.. image:: https://raw.githubusercontent.com/openwisp/django-flat-json-widget/master/docs/django-flat-json-widget-demo.gif
:target: https://github.com/openwisp/django-flat-json-widget/tree/master/docs/django-flat-json-widget-demo.gif
:alt: Django Flat JSON (key/value) Widget
----
If you ever needed to store a flexible dictionary of keys and values in
your django models, you may have felt the need of giving your users a
widget to easily manipulate the data by adding or removing rows, instead
of having to edit the raw JSON.
This package solves exactly that problem: **it offers a widget to
manipulate a flat JSON object made of simple keys and values**.
Compatibility
-------------
Tested on python >= 3.8 and Django 3.2, 4.1 and 4.2.
It should work also on previous versions of Django.
Install stable version from pypi
--------------------------------
Install from pypi:
.. code-block:: shell
pip install django-flat-json-widget
Usage
-----
Add ``flat_json_widget`` to ``INSTALLED_APPS``:
.. code-block:: python
INSTALLED_APPS = [
# other apps...
"flat_json_widget",
]
Then load the widget where you need it, for example, here's how to use it
in the django admin site:
.. code-block:: python
from django.contrib import admin
from django import forms
from .models import JsonDocument
from flat_json_widget.widgets import FlatJsonWidget
class JsonDocumentForm(forms.ModelForm):
class Meta:
widgets = {"content": FlatJsonWidget}
@admin.register(JsonDocument)
class JsonDocumentAdmin(admin.ModelAdmin):
list_display = ["name"]
form = JsonDocumentForm
Installing for development
--------------------------
Install your forked repo:
.. code-block:: shell
git clone git://github.com/<your_fork>/django-flat-json-widget
cd django-flat-json-widget/
python setup.py develop
Install development dependencies:
.. code-block:: shell
pip install -e .[test]
npm install -g jslint jshint stylelint
Create database:
.. code-block:: shell
cd tests/
./manage.py migrate
./manage.py createsuperuser
Launch development server:
.. code-block:: shell
./manage.py runserver 0.0.0.0:8000
You can access the admin interface at http://127.0.0.1:8000/admin/.
Run tests with:
.. code-block:: shell
./runtests.py
Run quality assurance tests with:
.. code-block:: shell
./run-qa-checks
Contributing
------------
Please refer to the `OpenWISP contributing guidelines
<http://openwisp.io/docs/developer/contributing.html>`_.
Changelog
---------
See `CHANGES
<https://github.com/openwisp/django-flat-json-widget/blob/master/CHANGES.rst>`_.
License
-------
See `LICENSE
<https://github.com/openwisp/django-flat-json-widget/blob/master/LICENSE>`_.
Support
-------
See `OpenWISP Support Channels <http://openwisp.org/support.html>`_.
Raw data
{
"_id": null,
"home_page": "https://github.com/openwisp/django-flat-json-widget",
"name": "django-flat-json-widget",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "django, json, key-value, widget",
"author": "OpenWISP",
"author_email": "support@openwisp.io",
"download_url": "https://files.pythonhosted.org/packages/fe/86/954a6c21ccbcdb68084b47f1b4cfc6505a1961d68008eeb7b4019ef766ac/django_flat_json_widget-0.3.1.tar.gz",
"platform": "Platform Independent",
"description": "django-flat-json-widget\n=======================\n\n.. image:: https://github.com/openwisp/django-flat-json-widget/workflows/Django%20Flat%20JSON%20Widget%20CI%20Build/badge.svg?branch=master\n :target: https://github.com/openwisp/openwisp-controller/actions?query=workflow%3A%22Django%20Flat%20JSON%20Widget%20CI%20Build%22\n :alt: CI build status\n\n.. image:: https://coveralls.io/repos/openwisp/django-flat-json-widget/badge.svg\n :target: https://coveralls.io/r/openwisp/django-flat-json-widget\n :alt: Test Coverage\n\n.. image:: https://img.shields.io/librariesio/release/github/openwisp/django-flat-json-widget\n :target: https://libraries.io/github/openwisp/django-flat-json-widget#repository_dependencies\n :alt: Dependency monitoring\n\n.. image:: https://img.shields.io/gitter/room/nwjs/nw.js.svg\n :target: https://gitter.im/openwisp/general\n :alt: Chat\n\n.. image:: https://badge.fury.io/py/django-flat-json-widget.svg\n :target: http://badge.fury.io/py/django-flat-json-widget\n :alt: Pypi Version\n\n.. image:: https://pepy.tech/badge/django-flat-json-widget\n :target: https://pepy.tech/project/django-flat-json-widget\n :alt: Downloads\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n :target: https://pypi.org/project/black/\n :alt: code style: black\n\n.. image:: https://raw.githubusercontent.com/openwisp/django-flat-json-widget/master/docs/django-flat-json-widget-demo.gif\n :target: https://github.com/openwisp/django-flat-json-widget/tree/master/docs/django-flat-json-widget-demo.gif\n :alt: Django Flat JSON (key/value) Widget\n\n----\n\nIf you ever needed to store a flexible dictionary of keys and values in\nyour django models, you may have felt the need of giving your users a\nwidget to easily manipulate the data by adding or removing rows, instead\nof having to edit the raw JSON.\n\nThis package solves exactly that problem: **it offers a widget to\nmanipulate a flat JSON object made of simple keys and values**.\n\nCompatibility\n-------------\n\nTested on python >= 3.8 and Django 3.2, 4.1 and 4.2.\n\nIt should work also on previous versions of Django.\n\nInstall stable version from pypi\n--------------------------------\n\nInstall from pypi:\n\n.. code-block:: shell\n\n pip install django-flat-json-widget\n\nUsage\n-----\n\nAdd ``flat_json_widget`` to ``INSTALLED_APPS``:\n\n.. code-block:: python\n\n INSTALLED_APPS = [\n # other apps...\n \"flat_json_widget\",\n ]\n\nThen load the widget where you need it, for example, here's how to use it\nin the django admin site:\n\n.. code-block:: python\n\n from django.contrib import admin\n from django import forms\n from .models import JsonDocument\n\n from flat_json_widget.widgets import FlatJsonWidget\n\n\n class JsonDocumentForm(forms.ModelForm):\n class Meta:\n widgets = {\"content\": FlatJsonWidget}\n\n\n @admin.register(JsonDocument)\n class JsonDocumentAdmin(admin.ModelAdmin):\n list_display = [\"name\"]\n form = JsonDocumentForm\n\nInstalling for development\n--------------------------\n\nInstall your forked repo:\n\n.. code-block:: shell\n\n git clone git://github.com/<your_fork>/django-flat-json-widget\n cd django-flat-json-widget/\n python setup.py develop\n\nInstall development dependencies:\n\n.. code-block:: shell\n\n pip install -e .[test]\n npm install -g jslint jshint stylelint\n\nCreate database:\n\n.. code-block:: shell\n\n cd tests/\n ./manage.py migrate\n ./manage.py createsuperuser\n\nLaunch development server:\n\n.. code-block:: shell\n\n ./manage.py runserver 0.0.0.0:8000\n\nYou can access the admin interface at http://127.0.0.1:8000/admin/.\n\nRun tests with:\n\n.. code-block:: shell\n\n ./runtests.py\n\nRun quality assurance tests with:\n\n.. code-block:: shell\n\n ./run-qa-checks\n\nContributing\n------------\n\nPlease refer to the `OpenWISP contributing guidelines\n<http://openwisp.io/docs/developer/contributing.html>`_.\n\nChangelog\n---------\n\nSee `CHANGES\n<https://github.com/openwisp/django-flat-json-widget/blob/master/CHANGES.rst>`_.\n\nLicense\n-------\n\nSee `LICENSE\n<https://github.com/openwisp/django-flat-json-widget/blob/master/LICENSE>`_.\n\nSupport\n-------\n\nSee `OpenWISP Support Channels <http://openwisp.org/support.html>`_.\n",
"bugtrack_url": null,
"license": "BSD-3-Clause",
"summary": "Django Flat JSON Key/Value Widget",
"version": "0.3.1",
"project_urls": {
"Download": "https://github.com/openwisp/django-flat-json-widget/releases",
"Homepage": "https://github.com/openwisp/django-flat-json-widget"
},
"split_keywords": [
"django",
" json",
" key-value",
" widget"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "17bb15884c3ba2a1342f56ae0a2a852262380ab2099d2a36915675b3f680547f",
"md5": "9d2a077c0a89b3a93c167eaa80420d09",
"sha256": "69ef04010196b0120bd9bc48feaa38bb2dbda608d2119f5e9aa46c0e18af2e54"
},
"downloads": -1,
"filename": "django_flat_json_widget-0.3.1-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "9d2a077c0a89b3a93c167eaa80420d09",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 17110,
"upload_time": "2024-11-19T22:56:51",
"upload_time_iso_8601": "2024-11-19T22:56:51.174772Z",
"url": "https://files.pythonhosted.org/packages/17/bb/15884c3ba2a1342f56ae0a2a852262380ab2099d2a36915675b3f680547f/django_flat_json_widget-0.3.1-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "fe86954a6c21ccbcdb68084b47f1b4cfc6505a1961d68008eeb7b4019ef766ac",
"md5": "3cce4ea3d28716e34c1ee6d19ca442c7",
"sha256": "2b68fd8933efede6e86ba72f87e61dc35b35aeee4d6d001887a0f9046d616c8e"
},
"downloads": -1,
"filename": "django_flat_json_widget-0.3.1.tar.gz",
"has_sig": false,
"md5_digest": "3cce4ea3d28716e34c1ee6d19ca442c7",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 16942,
"upload_time": "2024-11-19T22:56:52",
"upload_time_iso_8601": "2024-11-19T22:56:52.710641Z",
"url": "https://files.pythonhosted.org/packages/fe/86/954a6c21ccbcdb68084b47f1b4cfc6505a1961d68008eeb7b4019ef766ac/django_flat_json_widget-0.3.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-19 22:56:52",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "openwisp",
"github_project": "django-flat-json-widget",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "django-flat-json-widget"
}