Filter and action to work with tags in the django-admin-backend.
Project description
Description
This app is build in top of django-taggit and provides a tag-filter and an admin-action to handle tags with ease within django’s admin backend.
Tag-Filter
The tag filter allows you to include and exclude mutliple tags as well as easily deleting tags.
Admin-Action
The admin action allows you to easily add and remove tags from objects.
Installation
Install from pypi.org:
pip install django-admin-taggit-ui
Setup
Add more_admin_filters to your installed apps:
INSTALLED_APPS = [ 'taggit_ui', ... ]
Extend your url_patterns
in urls.py:
urlpatterns = [ ... url(r'^', include('taggit_ui.urls')), ]
Add the TagFilter
and manage_tag
action to your ModelAdmin:
from taggit_ui.filters import TagFilter from taggit_ui.actions import tag_manager class MyModelAdmin(admin.ModelAdmin): ... list_filter = [ TagFilter, ... ] actions = [ tag_manager, ... ]
It is possible to optionally tag related items of other models using the admin
action. Therefore initialize the TagManager`
class with a
ModelTree:
from taggit_ui.actions import TagManager from modeltree import ModelTree class MyModelAdmin(admin.ModelAdmin): ... actions = [ TagManager(ModelTree), ... ]
The admin action will then render its form with all taggible related Models as checkbox fields and the count of related items belonging to these models.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django_admin_taggit_ui-1.2.tar.gz
.
File metadata
- Download URL: django_admin_taggit_ui-1.2.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83303668f59a51923d75768e230d36fe6215dff8f225e6eb70d25229037ce432 |
|
MD5 | 32f48362fbd331c693ecc84e6b8f28ab |
|
BLAKE2b-256 | 5d6bfd43c759d331e46fd16a4fbd100c0f8a6e833d1efef3adc07852972894d3 |
File details
Details for the file django_admin_taggit_ui-1.2-py3-none-any.whl
.
File metadata
- Download URL: django_admin_taggit_ui-1.2-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67f3c276623275c9b71c166ef8bd29d403b3bc538e556cac685d99a4fb0249a7 |
|
MD5 | 8d57997a441b593aacce62007929718f |
|
BLAKE2b-256 | bb94876d8d70c70e5faf2e10a3e0af149b7bf6b56d55eb097cf7478b1a0fb7ba |