Skip to main content

Filter and action to work with tags in the django-admin-backend.

Project description

python: 3.8, 3.9, 3.10,3.11,3.12,3.13 django: 3.0, 3.1, 3.2, 4.0, 4.1, 4.2, 5.0, 5.1,5.2,6.0 Run tests for django-admin-taggit-ui Coveralls

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_admin_taggit_ui-1.3.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_admin_taggit_ui-1.3-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file django_admin_taggit_ui-1.3.tar.gz.

File metadata

  • Download URL: django_admin_taggit_ui-1.3.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for django_admin_taggit_ui-1.3.tar.gz
Algorithm Hash digest
SHA256 d4211517d30460cabe550b61353287ef9605ba9d0f4c00d6441ff3b9dcbf63f0
MD5 a86c12c4a7dcf128d4c68816d24dfb82
BLAKE2b-256 ea9989ff82ea3bcfadad901ca8bc66d7404b29cd56239e4957f3f86790642f19

See more details on using hashes here.

File details

Details for the file django_admin_taggit_ui-1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for django_admin_taggit_ui-1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 70c95351f1f43ca75709c274a9a3db756d5ed042351ca11ebd5d23979f9c5f87
MD5 2bcd015b03ed7f11669e790d1041273e
BLAKE2b-256 3b2748bffc4321a04937ab8fbc106d4fca58aaa6764f283572aec9d8d4431620

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page