Installation
Installing django-adminactions is as simple as checking out the source and adding it to
your project or PYTHONPATH
.
-
First of all follow the instruction to install
django_admin
_ application, -
Either check out django-adminactions from
GitHub
or to pull a release offPyPI
. Doingpip install django-adminactions
oreasy_install django-adminactions
is all that should be required. -
Either symlink the
adminactions
directory into your project or copy the directory in. What ever works best for you.
Install test dependencies
If you want to run :mod:adminactions
tests you need extra requirements
uv sync --all-groups
Configuration
Add adminactions
to your INSTALLED_APPS
::
Add the actions to your site::
from django.contrib.admin import site
import adminactions.actions as actions
# register all adminactions
actions.add_to_site(site)
Add service url to your urls.py ::
Bonus:
add AdminActionPermMixin
to your ModelAdmin
::
Add defaults for the Export to CSV to the Django Config. See all available settings at export_as_csv