{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "![Screenshot](https://github.com/lukasvinclav/django-admin-actions/raw/master/screenshot.png)\n\n# django-admin-actions\n\n![](https://img.shields.io/badge/Version-0.1.0-orange.svg?style=flat-square)\n![](https://img.shields.io/badge/Django-2.0+-green.svg?style=flat-square)\n![](https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square)\n\ndjango-admin-actions provides simple way how to define custom actions for Django admin changelist, changeview and per row in changelist.\n\n## Getting started\n\n1. Installation\n\n```bash\npip install django-admin-actions\n```\n\n```bash\npip install git+https://git@github.com/lukasvinclav/django-admin-actions.git\n```\n\n2. Add **admin_admin_actions** into **INSTALLED_APPS** in your settings file before **django.contrib.admin**.\n\n## Sample admin configuration\n\n```python\nfrom django.contrib import admin\nfrom django.shortcuts import redirect\nfrom django.urls import reverse_lazy\nfrom django.utils.translations import ugettext_lazy as _\n\nfrom admin_actions.admin import ActionsModelAdmin\n\nfrom .models import ExampleModel\n\n\n@admin.register(ExampleModel)\nclass CustomAdmin(ActionsModelAdmin):\n actions_list = ('custom_list_action', )\n actions_row = ('custom_row_action', )\n actions_detail = ('custom_detail_action', )\n\n def custom_list_action(self, request):\n # custom logic here\n return redirect(reverse_lazy('admin:APP_MODEL_changelist'))\n custom_list_action.short_description = _('Custom name')\n custom_list_action.url_path = 'clean-url-path-1'\n\n def custom_row_action(self, request, pk):\n # custom logic here\n return redirect(reverse_lazy('admin:APP_MODEL_changelist'))\n custom_row_action.short_description = _('Row custom name')\n custom_row_action.url_path = 'clean-url-path-2'\n\n def custom_detail_action(self, request, pk):\n # custom logic here\n return redirect(reverse_lazy('admin:APP_MODEL_changelist'))\n custom_detail_action.short_description = _('Detail custom name')\n custom_detail_action.url_path = 'clean-url-path-3'\n```", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/lukasvinclav/django-admin-actions", "keywords": "django admin actions", "license": "", "maintainer": "", "maintainer_email": "", "name": "django-admin-actions", "package_url": "https://pypi.org/project/django-admin-actions/", "platform": "", "project_url": "https://pypi.org/project/django-admin-actions/", "project_urls": { "Homepage": "http://github.com/lukasvinclav/django-admin-actions" }, "release_url": "https://pypi.org/project/django-admin-actions/0.1.1/", "requires_dist": null, "requires_python": "", "summary": "Display Django admin custom actions in change list, change form or per row in change list.", "version": "0.1.1" }, "last_serial": 4722148, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "70740b0df8edb5483b32e69a47883fd6", "sha256": "2dc236e22f836fabdcf411a89fa34630febc683cfcd022adb264d35e454516ac" }, "downloads": -1, "filename": "django-admin-actions-0.1.0.tar.gz", "has_sig": false, "md5_digest": "70740b0df8edb5483b32e69a47883fd6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3595, "upload_time": "2018-09-15T09:48:20", "url": "https://files.pythonhosted.org/packages/ed/33/42f800cd6e17c82334c4da986812e0ca5934f0d82ca8c12a31efe8a0b05e/django-admin-actions-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "f6f98bdcf81304397c3135cfa6911a44", "sha256": "4a10875f31b24093a1067c49e880b74da2f4fcc39f8824db0690579b9df0904f" }, "downloads": -1, "filename": "django-admin-actions-0.1.1.tar.gz", "has_sig": false, "md5_digest": "f6f98bdcf81304397c3135cfa6911a44", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3653, "upload_time": "2019-01-21T15:59:58", "url": "https://files.pythonhosted.org/packages/d1/60/4f1d85a0b63fcb1194bcb5380c76fb9b7e8f2446116d188ea764af5f0d5a/django-admin-actions-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f6f98bdcf81304397c3135cfa6911a44", "sha256": "4a10875f31b24093a1067c49e880b74da2f4fcc39f8824db0690579b9df0904f" }, "downloads": -1, "filename": "django-admin-actions-0.1.1.tar.gz", "has_sig": false, "md5_digest": "f6f98bdcf81304397c3135cfa6911a44", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3653, "upload_time": "2019-01-21T15:59:58", "url": "https://files.pythonhosted.org/packages/d1/60/4f1d85a0b63fcb1194bcb5380c76fb9b7e8f2446116d188ea764af5f0d5a/django-admin-actions-0.1.1.tar.gz" } ] }