:warning: Work In Progress :warning:
# Writable Nested Serializers with Browsable API Forms
This plugin is intended to provide writable nested serializers (similar to [the recommended plugin from DRF documentation](https://github.com/beda-software/drf-nested-browsable.git)) that bring their own forms for the Browsable API renderer.
## Try it out
This project's dependencies are managed using [`poetry`](https://python-poetry.org/)
```bash
git clone https://github.com/pcouy/drf-nested-browsable
cd drf-nested-browsable
poetry install
cd example
poetry shell
python manage.py migrate
python manage.py runserver
```
The above commands will install the dependencies, run the DB migrations, and launch a development server of the example project that uses the provided serializers.
## Current state of the project
### Done
* Ability to write to a reverse `ForeignKey` relationship using serializer `Meta` class
* Dynamic form for `WritableNestedListSerializer` that allows adding and removing children from the Browsable API
* Arbitrary nesting depth
* Dynamically removing the parent field from serializers when used as an inner serializer
* Basic example
### To do
* Write documentation / Auto-generate it from the docstrings ([pdoc](https://pdoc.dev/) ?)
* Write tests/specs (from example ?)
* Better form design
* Add `ManyToMany` to example (and test it)
* Consider database schema constrains :
* Look into what `drf-writable-nested` does with uniqueness
* When the foreign key can be `null`, show a multiple select field for attaching orphan instances to a parent instance
* Show a multiple select field for `ManyToMany` relationships
Raw data
{
"_id": null,
"home_page": "https://pierre-couy.dev/projects/drf-nested-browsable.html",
"name": "drf-nested-browsable",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.10,<4.0",
"maintainer_email": "",
"keywords": "django,rest framework,drf,browsable api,nested serializers",
"author": "Pierre Couy",
"author_email": "contact@pierre-couy.dev",
"download_url": "https://files.pythonhosted.org/packages/0b/05/afa01829a73df5d755254148f249a2284fe2233104cdf10ffe45a9e32123/drf_nested_browsable-0.2.3.tar.gz",
"platform": null,
"description": ":warning: Work In Progress :warning:\n\n# Writable Nested Serializers with Browsable API Forms\n\nThis plugin is intended to provide writable nested serializers (similar to [the recommended plugin from DRF documentation](https://github.com/beda-software/drf-nested-browsable.git)) that bring their own forms for the Browsable API renderer.\n\n## Try it out\n\nThis project's dependencies are managed using [`poetry`](https://python-poetry.org/)\n\n```bash\ngit clone https://github.com/pcouy/drf-nested-browsable\ncd drf-nested-browsable\npoetry install\ncd example\npoetry shell\npython manage.py migrate\npython manage.py runserver\n```\n\nThe above commands will install the dependencies, run the DB migrations, and launch a development server of the example project that uses the provided serializers.\n\n## Current state of the project\n\n### Done\n\n* Ability to write to a reverse `ForeignKey` relationship using serializer `Meta` class\n* Dynamic form for `WritableNestedListSerializer` that allows adding and removing children from the Browsable API\n* Arbitrary nesting depth\n* Dynamically removing the parent field from serializers when used as an inner serializer\n* Basic example\n\n### To do\n\n* Write documentation / Auto-generate it from the docstrings ([pdoc](https://pdoc.dev/) ?)\n* Write tests/specs (from example ?)\n* Better form design\n* Add `ManyToMany` to example (and test it)\n* Consider database schema constrains :\n * Look into what `drf-writable-nested` does with uniqueness\n * When the foreign key can be `null`, show a multiple select field for attaching orphan instances to a parent instance\n * Show a multiple select field for `ManyToMany` relationships\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Writable nested serializers with forms for the Browsable API",
"version": "0.2.3",
"project_urls": {
"Homepage": "https://pierre-couy.dev/projects/drf-nested-browsable.html",
"Repository": "https://github.com/pcouy/drf-nested-browsable"
},
"split_keywords": [
"django",
"rest framework",
"drf",
"browsable api",
"nested serializers"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a98160e659117e936fed17954feeec3e97c0221dfeda3c9399323ad0f1e1a25d",
"md5": "9b5609c24edba47ce4aded58a58704f4",
"sha256": "227ca851cdc9fd584ff509d8a8161ce9df48c1f3a3ad0ff150fcfee11e8c2b4b"
},
"downloads": -1,
"filename": "drf_nested_browsable-0.2.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9b5609c24edba47ce4aded58a58704f4",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10,<4.0",
"size": 7402,
"upload_time": "2024-02-08T16:30:17",
"upload_time_iso_8601": "2024-02-08T16:30:17.412204Z",
"url": "https://files.pythonhosted.org/packages/a9/81/60e659117e936fed17954feeec3e97c0221dfeda3c9399323ad0f1e1a25d/drf_nested_browsable-0.2.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0b05afa01829a73df5d755254148f249a2284fe2233104cdf10ffe45a9e32123",
"md5": "984121dfaed06a81e665a0e68c8abf6f",
"sha256": "d5c43c5abdbde96b86825eb876afb6c7b40f417c3859a2227c0ed18c8f57118e"
},
"downloads": -1,
"filename": "drf_nested_browsable-0.2.3.tar.gz",
"has_sig": false,
"md5_digest": "984121dfaed06a81e665a0e68c8abf6f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10,<4.0",
"size": 6056,
"upload_time": "2024-02-08T16:30:19",
"upload_time_iso_8601": "2024-02-08T16:30:19.059307Z",
"url": "https://files.pythonhosted.org/packages/0b/05/afa01829a73df5d755254148f249a2284fe2233104cdf10ffe45a9e32123/drf_nested_browsable-0.2.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-08 16:30:19",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "pcouy",
"github_project": "drf-nested-browsable",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "drf-nested-browsable"
}