{"id":13849411,"url":"https://github.com/mfcovington/django-taggit-helpers","last_synced_at":"2026-02-27T18:49:26.364Z","repository":{"id":33461667,"uuid":"37107153","full_name":"mfcovington/django-taggit-helpers","owner":"mfcovington","description":"Django admin helper classes for django-taggit tags","archived":false,"fork":false,"pushed_at":"2023-09-28T14:05:25.000Z","size":545,"stargazers_count":31,"open_issues_count":4,"forks_count":6,"subscribers_count":4,"default_branch":"develop","last_synced_at":"2025-05-24T07:53:35.650Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pypi.python.org/pypi/django-taggit-helpers/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mfcovington.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2015-06-09T03:11:26.000Z","updated_at":"2025-01-15T18:25:31.000Z","dependencies_parsed_at":"2024-01-06T10:14:58.506Z","dependency_job_id":"f0cbd082-5b37-40f1-8f6b-66f90994c004","html_url":"https://github.com/mfcovington/django-taggit-helpers","commit_stats":{"total_commits":43,"total_committers":2,"mean_commits":21.5,"dds":"0.023255813953488413","last_synced_commit":"963de3ab91f381343c4d3cb51e15ad09c52df22d"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/mfcovington/django-taggit-helpers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfcovington%2Fdjango-taggit-helpers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfcovington%2Fdjango-taggit-helpers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfcovington%2Fdjango-taggit-helpers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfcovington%2Fdjango-taggit-helpers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mfcovington","download_url":"https://codeload.github.com/mfcovington/django-taggit-helpers/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfcovington%2Fdjango-taggit-helpers/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261637777,"owners_count":23188284,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T19:01:16.891Z","updated_at":"2026-02-27T18:49:21.334Z","avatar_url":"https://github.com/mfcovington.png","language":"Python","funding_links":[],"categories":["Tagging","Python","标签"],"sub_categories":[],"readme":"*********************\ndjango-taggit-helpers\n*********************\n\n``django-taggit-helpers`` makes it easier to work with admin pages of models associated with ``django-taggit`` tags.\n\nSource code is available on GitHub at `mfcovington/django-taggit-helpers \u003chttps://github.com/mfcovington/django-taggit-helpers\u003e`_. Information about ``django-taggit`` is available on `GitHub \u003chttps://github.com/alex/django-taggit\u003e`_ and `Read the Docs \u003chttp://django-taggit.readthedocs.org/en/latest/index.html\u003e`_.\n\n``django-taggit-helpers`` is compatible with Python 2.7+/3.2+ and Django 1.7+.\n\n.. contents:: :local:\n\nInstallation\n============\n\n**PyPI**\n\n.. code-block:: sh\n\n    pip install django-taggit-helpers\n\n**GitHub (development branch)**\n\n.. code-block:: sh\n\n    pip install git+http://github.com/mfcovington/django-taggit-helpers.git@develop\n\nConfiguration\n=============\n\nAdd ``taggit_helpers`` to ``INSTALLED_APPS`` in ``settings.py``:\n\n.. code-block:: python\n\n    INSTALLED_APPS = (\n        ...\n        'taggit',\n        'taggit_helpers',\n    )\n\nHelper Classes\n==============\n\n``TaggitCounter``\n-----------------\n\nDisplay (and sort by) number of Taggit tags associated with tagged items.\n\n.. code-block:: python\n\n    from taggit_helpers import TaggitCounter\n    # For Django 1.9+, use this instead:\n    # from taggit_helpers.admin import TaggitCounter\n\n    class MyModelAdmin(TaggitCounter, admin.ModelAdmin):    # TaggitCounter before ModelAdmin\n        list_display = (\n            ...\n            'taggit_counter',\n        )\n\n*Note:* Currently, the ``TaggableManager()`` field must be named ``tags``.\n\n*Note:* To avoid overcounting, set ``distinct=True`` if further annotating the queryset with ``Count()``:\n\n.. code-block:: python\n\n    queryset.annotate(m2m_field_count=Count('m2m_field', distinct=True))\n\n``TaggitListFilter``\n--------------------\n\nFilter records by Taggit tags for the current model only.\nTags are sorted alphabetically by name.\n\n.. code-block:: python\n\n    from taggit_helpers import TaggitListFilter\n    # For Django 1.9+, use this instead:\n    # from taggit_helpers.admin import TaggitListFilter\n\n    class MyModelAdmin(admin.ModelAdmin):\n        list_filter = [TaggitListFilter]\n\n``TaggitStackedInline``\n-----------------------\n\nAdd stacked inline for Taggit tags to admin.\nTags are sorted alphabetically by name.\n\n.. code-block:: python\n\n    from taggit_helpers import TaggitStackedInline\n    # For Django 1.9+, use this instead:\n    # from taggit_helpers.admin import TaggitStackedInline\n\n    class MyModelAdmin(admin.ModelAdmin):\n        inlines = [TaggitStackedInline]\n\n``TaggitTabularInline``\n-----------------------\n\nAdd tabular inline for Taggit tags to admin.\nTags are sorted alphabetically by name.\n\n.. code-block:: python\n\n    from taggit_helpers import TaggitTabularInline\n    # For Django 1.9+, use this instead:\n    # from taggit_helpers.admin import TaggitTabularInline\n\n    class MyModelAdmin(admin.ModelAdmin):\n        inlines = [TaggitTabularInline]\n\nUpgrading existing projects to Django 1.9+\n==========================================\n\nApp 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.\n\n.. code-block:: sh\n\n    find . -name '*.py' | xargs perl -i -pe 's/from taggit_helpers import/from taggit_helpers.admin import/'\n\nThanks to `jpic \u003chttps://github.com/jpic\u003e`_ for the `inspiration \u003chttps://github.com/yourlabs/django-autocomplete-light/commit/d87a3ba8be745ff3e5142d9438f3b8318f4bf547\u003e`_ for this snippet!\n\nIssues\n======\n\nIf you experience any problems or would like to request a feature, please `create an issue \u003chttps://github.com/mfcovington/django-taggit-helpers/issues\u003e`_ on GitHub.\n\n*Version 0.1.4*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmfcovington%2Fdjango-taggit-helpers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmfcovington%2Fdjango-taggit-helpers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmfcovington%2Fdjango-taggit-helpers/lists"}