Skip to content

mfcovington/django-taggit-helpers

Repository files navigation

django-taggit-helpers

django-taggit-helpers makes it easier to work with admin pages of models associated with django-taggit tags.

Source code is available on GitHub at mfcovington/django-taggit-helpers. Information about django-taggit is available on GitHub and Read the Docs.

django-taggit-helpers is compatible with Python 2.7+/3.2+ and Django 1.7+.

local

Installation

PyPI

GitHub (development branch)

Configuration

Add taggit_helpers to INSTALLED_APPS in settings.py:

Helper Classes

TaggitCounter

Display (and sort by) number of Taggit tags associated with tagged items.

Note: Currently, the TaggableManager() field must be named tags.

Note: To avoid overcounting, set distinct=True if further annotating the queryset with Count():

TaggitListFilter

Filter records by Taggit tags for the current model only. Tags are sorted alphabetically by name.

TaggitStackedInline

Add stacked inline for Taggit tags to admin. Tags are sorted alphabetically by name.

TaggitTabularInline

Add tabular inline for Taggit tags to admin. Tags are sorted alphabetically by name.

Upgrading existing projects to Django 1.9+

App loading was refactored in Django 1.9. To make a Django 1.7/1.8 app Django 1.9-compatible with respect to django-taggit-helpers, run the following shell command in your app's directory.

Thanks to jpic for the inspiration for this snippet!

Issues

If you experience any problems or would like to request a feature, please create an issue on GitHub.

Version 0.1.4