Django-Admin-Buttons
====================
This package used to add a button functionality to the change list
columns in the django admin, it uses the action methods used in the
**ModelAdmin**\
I wrote this package as an implementation for this article, it not hard
to write the button yourself
Getting Started
---------------
1. Install the app
::
pip install django-admin-buttons
2. Add the app to the **INSTALLED_APPS** above the admin and static apps
.. code::
INSTALLED_APPS = [
'django_admin_buttons', # add here
'django.contrib.admin',
'django.contrib.staticfiles',
3. Use the button as needed
.. code::
from django.contrib import admin
from django_admin_buttons.admin_button import AdminActionButton
def Test_function(modeladmin, request, queryset):
# write you implementation here
pass
class AdminTest(admin.ModelAdmin):
# add the button
list_display = ('id', 'name', 'button')
# register the function
actions = [Test_function]
# create the function that displays the button
@admin.display()
def button(self, obj):
return AdminActionButton(obj.id, 'this', disabled = False, Class='btn-primary', label=None).render()
Raw data
{
"_id": null,
"home_page": "https://github.com/minaaaatef/Django-Admin-Buttons",
"name": "django-admin-buttons",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "django,buttons,admin,actions",
"author": "Mina Atef",
"author_email": "Mina Atef <mina.atef0@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/5c/3e/331740a1b845b19f68d6de6600dfc95418de5012b722923aac8f7f15cfb7/django-admin-buttons-0.2.5.tar.gz",
"platform": null,
"description": "Django-Admin-Buttons\n====================\n\nThis package used to add a button functionality to the change list\ncolumns in the django admin, it uses the action methods used in the\n**ModelAdmin**\\ \n\nI wrote this package as an implementation for this article, it not hard\nto write the button yourself\n\nGetting Started\n---------------\n\n1. Install the app\n\n::\n\n pip install django-admin-buttons\n\n2. Add the app to the **INSTALLED_APPS** above the admin and static apps\n\n.. code::\n\n\n INSTALLED_APPS = [\n 'django_admin_buttons', # add here\n\n 'django.contrib.admin',\n 'django.contrib.staticfiles',\n\n3. Use the button as needed\n\n.. code::\n\n from django.contrib import admin\n from django_admin_buttons.admin_button import AdminActionButton\n\n\n def Test_function(modeladmin, request, queryset):\n # write you implementation here\n pass \n\n class AdminTest(admin.ModelAdmin):\n # add the button \n list_display = ('id', 'name', 'button') \n \n # register the function\n actions = [Test_function] \n \n # create the function that displays the button\n @admin.display()\n def button(self, obj):\n return AdminActionButton(obj.id, 'this', disabled = False, Class='btn-primary', label=None).render()\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "django-admin-buttons for the Django Admin.",
"version": "0.2.5",
"project_urls": {
"Homepage": "https://github.com/minaaaatef/Django-Admin-Buttons"
},
"split_keywords": [
"django",
"buttons",
"admin",
"actions"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "550861b59e7b544c3235bd6d96154933c5230f06e1aee6757c50ba2e83182954",
"md5": "92cd968de772513e9bda03aa174aacd5",
"sha256": "f68193422e7fef6e683646794443ef780f51ed78daeb2ef835c6c742f5a23cf9"
},
"downloads": -1,
"filename": "django_admin_buttons-0.2.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "92cd968de772513e9bda03aa174aacd5",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 4203,
"upload_time": "2023-06-03T12:39:38",
"upload_time_iso_8601": "2023-06-03T12:39:38.557856Z",
"url": "https://files.pythonhosted.org/packages/55/08/61b59e7b544c3235bd6d96154933c5230f06e1aee6757c50ba2e83182954/django_admin_buttons-0.2.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5c3e331740a1b845b19f68d6de6600dfc95418de5012b722923aac8f7f15cfb7",
"md5": "2595016d3fe5c9c0e45586685dfd9747",
"sha256": "3159b05d342d1eae98e3e70f93f32758a7785073bd023bcca3897557a1cac06b"
},
"downloads": -1,
"filename": "django-admin-buttons-0.2.5.tar.gz",
"has_sig": false,
"md5_digest": "2595016d3fe5c9c0e45586685dfd9747",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 3799,
"upload_time": "2023-06-03T12:39:40",
"upload_time_iso_8601": "2023-06-03T12:39:40.390593Z",
"url": "https://files.pythonhosted.org/packages/5c/3e/331740a1b845b19f68d6de6600dfc95418de5012b722923aac8f7f15cfb7/django-admin-buttons-0.2.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-06-03 12:39:40",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "minaaaatef",
"github_project": "Django-Admin-Buttons",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "django-admin-buttons"
}