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.1.tar.gz
.
File metadata
- Download URL: django-admin-taggit-ui-1.1.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea08167ae01a6b72dec280846c60adee464a780bb591decdc963a16938d279eb |
|
MD5 | 3fc92daa972768db6d9bfce8e1878c43 |
|
BLAKE2b-256 | bde324d9e353667817957bb1bc5712b13d825833b2e5b8f9ea681211a98713d4 |
Provenance
File details
Details for the file django_admin_taggit_ui-1.1-py3-none-any.whl
.
File metadata
- Download URL: django_admin_taggit_ui-1.1-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d1f96bbaaf1e51732c06dd31f22a96a0d4ef7d226c74999e7c00c754d515cee |
|
MD5 | 38becd32b6e377a7b6f3b9c55a5aad2d |
|
BLAKE2b-256 | eef7c8d1600ddf8cc3109923e9188d64ccddb189ee8fc4a32eeab7756b924af9 |