Skip to content
Simple tagging for django
Branch: master
Clone or download
jdufresne Clean up docs
- Minimize sphinx overrides and configuration
- Move to .rst suffix
- Build as part of tox & travis
- Turn on nit picky mode and treat warnings as errors
- Use intersphinx to link to Django docs
- Fix all errors
Latest commit 2552899 Mar 17, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
requirements Remove Python 2 support Feb 23, 2019
tests Removed TaggableManager.related_query_name() Mar 15, 2019
.travis.yml Clean up docs Mar 17, 2019
AUTHORS Add myself to the authors list Nov 18, 2018
CONTRIBUTING.rst Use one-liner tox command for style checking Feb 24, 2019
LICENSE clean whitespace Sep 9, 2014 Clean up docs Mar 17, 2019
setup.cfg Move closer to flake8/isort defaults Mar 17, 2019
tox.ini Clean up docs Mar 17, 2019




This is a Jazzband project. By contributing you agree to abide by the Contributor Code of Conduct and follow the guidelines.

django-taggit a simpler approach to tagging with Django. Add "taggit" to your INSTALLED_APPS then just add a TaggableManager to your model and go:

from django.db import models

from taggit.managers import TaggableManager

class Food(models.Model):
    # ... fields here

    tags = TaggableManager()

Then you can use the API like so:

>>> apple = Food.objects.create(name="apple")
>>> apple.tags.add("red", "green", "delicious")
>>> apple.tags.all()
[<Tag: red>, <Tag: green>, <Tag: delicious>]
>>> apple.tags.remove("green")
>>> apple.tags.all()
[<Tag: red>, <Tag: delicious>]
>>> Food.objects.filter(tags__name__in=["red"])
[<Food: apple>, <Food: cherry>]

Tags will show up for you automatically in forms and the admin.

django-taggit requires Django 1.11 or greater.

For more info check out the documentation. And for questions about usage or development you can contact the mailinglist.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.