Django Admin Inline Paginator Plus ⏩
=====================================
**🍴 This is a forked and updated version based on original library [django-admin-inline-paginator](https://github.com/shinneider/django-admin-inline-paginator).**
> *As for 10.07.2024 nobody took responsibility, so I decided to take it since we need additional functionlity like AJAX for pagination.*
The **"Django Admin Inline Paginator Plus"** is simple way to paginate your inline in django admin
To keep Django ecosystem fresh and updated, please share your love and support, click `Star` 🫶
## Features
- **Easy Inline Pagination:** Quickly paginate inlines in the Django admin.
- **AJAX Support:** Smooth and dynamic pagination without page reloads with `htmx`.
- **Multiple Inline Pagination:** Manage multiple paginated inlines seamlessly.
Here's a screenshot of the paginated inlines in action:
![Django Admin Inline Paginator Plus screenshot](https://github.com/DmytroLitvinov/django-admin-inline-paginator-plus/tree/master/example/django-admin-inline-paginator-plus.png "Title")
# Install:
Install the package via pip:
```bash
pip install django-admin-inline-paginator-plus
```
# Usage:
1. Add to your INSTALLED_APPS, in settings.py:
```
INSTALLED_APPS = [
...
'django_admin_inline_paginator_plus',
...
]
```
2. Create your model inline:
You can use `TabularInlinePaginated` ot `StackedInlinePaginated`. In our example we use `TabularInlinePaginated`.
```
from django_admin_inline_paginator_plus.admin import TabularInlinePaginated
class ModelWithFKAdminInline(TabularInlinePaginated):
model = ModelWithFK
fields = (...)
per_page = 5
```
3. Create main model admin and use inline:
```
@register(YourModel)
class YourModelAdmin(ModelAdmin):
model = YourModel
fields = (...)
inlines = (ModelWithFKAdminInline, )
```
# Advanced Usage:
1. Paginate multiples inlines:
```
from django_admin_inline_paginator_plus.admin import TabularInlinePaginated, StackedInlinePaginated
class ModelWithFKInline(TabularInlinePaginated):
model = ModelWithFK
fields = ('name', 'active')
per_page = 2
pagination_key = 'page-model' # make sure it's unique for page inline
class AnotherModelWithFKInline(StackedInlinePaginated):
model = AnotherModelWithFK
fields = ('name', 'active')
per_page = 2
pagination_key = 'page-another-model' # make sure it's unique for page inline
```
2. Use inlines from step 1. and add to your main model admin:
```
@register(YourModel)
class YourModelAdmin(ModelAdmin):
model = YourModel
fields = (...)
inlines = (ModelWithFKAdminInline, AnotherModelWithFKInline)
```
Raw data
{
"_id": null,
"home_page": null,
"name": "django-admin-inline-paginator-plus",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "Dmytro Litvinov <me@dmytrolitvinov.com>",
"keywords": "django, admin, paginator, inlines, pagination",
"author": null,
"author_email": "Shinneider Libanio da Silva <shinneider-libanio@hotmail.com>, Dmytro Litvinov <me@dmytrolitvinov.com>",
"download_url": "https://files.pythonhosted.org/packages/c9/a1/c2beb736c7ebf9c2fd39c94d6d6f73a2015ab0d03fe79f3818c96abef334/django_admin_inline_paginator_plus-0.1.1.tar.gz",
"platform": null,
"description": "Django Admin Inline Paginator Plus \u23e9\n=====================================\n\n**\ud83c\udf74 This is a forked and updated version based on original library [django-admin-inline-paginator](https://github.com/shinneider/django-admin-inline-paginator).**\n\n> *As for 10.07.2024 nobody took responsibility, so I decided to take it since we need additional functionlity like AJAX for pagination.*\n\nThe **\"Django Admin Inline Paginator Plus\"** is simple way to paginate your inline in django admin\n\nTo keep Django ecosystem fresh and updated, please share your love and support, click `Star` \ud83e\udef6\n\n## Features\n- **Easy Inline Pagination:** Quickly paginate inlines in the Django admin.\n- **AJAX Support:** Smooth and dynamic pagination without page reloads with `htmx`.\n- **Multiple Inline Pagination:** Manage multiple paginated inlines seamlessly.\n\n\nHere's a screenshot of the paginated inlines in action:\n\n![Django Admin Inline Paginator Plus screenshot](https://github.com/DmytroLitvinov/django-admin-inline-paginator-plus/tree/master/example/django-admin-inline-paginator-plus.png \"Title\")\n\n\n# Install:\n\nInstall the package via pip:\n\n```bash\npip install django-admin-inline-paginator-plus\n```\n\n# Usage:\n\n1. Add to your INSTALLED_APPS, in settings.py:\n\n ```\n INSTALLED_APPS = [\n ...\n 'django_admin_inline_paginator_plus',\n ...\n ]\n ```\n2. Create your model inline:\n\n You can use `TabularInlinePaginated` ot `StackedInlinePaginated`. In our example we use `TabularInlinePaginated`.\n\n ```\n from django_admin_inline_paginator_plus.admin import TabularInlinePaginated\n\n class ModelWithFKAdminInline(TabularInlinePaginated):\n model = ModelWithFK\n fields = (...)\n per_page = 5\n ```\n\n3. Create main model admin and use inline:\n\n ```\n @register(YourModel)\n class YourModelAdmin(ModelAdmin):\n model = YourModel\n fields = (...)\n inlines = (ModelWithFKAdminInline, )\n ```\n\n# Advanced Usage:\n\n1. Paginate multiples inlines:\n\n ```\n from django_admin_inline_paginator_plus.admin import TabularInlinePaginated, StackedInlinePaginated\n\n class ModelWithFKInline(TabularInlinePaginated):\n model = ModelWithFK\n fields = ('name', 'active')\n per_page = 2\n pagination_key = 'page-model' # make sure it's unique for page inline\n\n class AnotherModelWithFKInline(StackedInlinePaginated):\n model = AnotherModelWithFK\n fields = ('name', 'active')\n per_page = 2\n pagination_key = 'page-another-model' # make sure it's unique for page inline\n ```\n\n2. Use inlines from step 1. and add to your main model admin:\n\n ```\n @register(YourModel)\n class YourModelAdmin(ModelAdmin):\n model = YourModel\n fields = (...)\n inlines = (ModelWithFKAdminInline, AnotherModelWithFKInline)\n ```\n",
"bugtrack_url": null,
"license": "MIT license",
"summary": "The 'Django Admin Inline Paginator Plus' is simple way to paginate your inlines in Django admin",
"version": "0.1.1",
"project_urls": {
"Changelog": "https://github.com/DmytroLitvinov/django-admin-inline-paginator-plus/CHANGELOG.md",
"Homepage": "https://github.com/DmytroLitvinov/django-admin-inline-paginator-plus",
"Issues": "https://github.com/DmytroLitvinov/django-admin-inline-paginator-plus/issues"
},
"split_keywords": [
"django",
" admin",
" paginator",
" inlines",
" pagination"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "31badd53aa348eb5cc69b7b826a7546e857b28778b3b6c91ae14f8e2a78fd11c",
"md5": "bf084d00521fc45a70cd119d465fc14b",
"sha256": "716167424bea941ee0666047f0e7e3da71701f85a025343fe3fb7a75ad68bd0d"
},
"downloads": -1,
"filename": "django_admin_inline_paginator_plus-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "bf084d00521fc45a70cd119d465fc14b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 9373,
"upload_time": "2024-07-26T15:48:14",
"upload_time_iso_8601": "2024-07-26T15:48:14.256989Z",
"url": "https://files.pythonhosted.org/packages/31/ba/dd53aa348eb5cc69b7b826a7546e857b28778b3b6c91ae14f8e2a78fd11c/django_admin_inline_paginator_plus-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "c9a1c2beb736c7ebf9c2fd39c94d6d6f73a2015ab0d03fe79f3818c96abef334",
"md5": "d3b61cf91a511b2f24cf512edd4931fa",
"sha256": "e493902948123a7c34ab4e7d966b5d73e540e8f876377e14ec209be0044b503b"
},
"downloads": -1,
"filename": "django_admin_inline_paginator_plus-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "d3b61cf91a511b2f24cf512edd4931fa",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 9249,
"upload_time": "2024-07-26T15:48:15",
"upload_time_iso_8601": "2024-07-26T15:48:15.618331Z",
"url": "https://files.pythonhosted.org/packages/c9/a1/c2beb736c7ebf9c2fd39c94d6d6f73a2015ab0d03fe79f3818c96abef334/django_admin_inline_paginator_plus-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-26 15:48:15",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "DmytroLitvinov",
"github_project": "django-admin-inline-paginator-plus",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"tox": true,
"lcname": "django-admin-inline-paginator-plus"
}