Skip to main content

django-taggit is a reusable Django application for simple tagging.

Project description

https://travis-ci.org/alex/django-taggit.svg?branch=master https://codecov.io/gh/alex/django-taggit/coverage.svg?branch=master

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.

Project details


Download files

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

Source Distribution

django-taggit-0.23.0.tar.gz (44.6 kB view details)

Uploaded Source

Built Distribution

django_taggit-0.23.0-py2.py3-none-any.whl (44.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file django-taggit-0.23.0.tar.gz.

File metadata

  • Download URL: django-taggit-0.23.0.tar.gz
  • Upload date:
  • Size: 44.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.9.1 pkginfo/1.3.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/3.6.6

File hashes

Hashes for django-taggit-0.23.0.tar.gz
Algorithm Hash digest
SHA256 a21cbe7e0879f1364eef1c88a2eda89d593bf000ebf51c3f00423c6927075dce
MD5 586d560442b160dbffa17eb0696cdac6
BLAKE2b-256 7fa1041796e40d67869c34cdf015b3e6ac03b1c742e15f793c68b8f0de455521

See more details on using hashes here.

File details

Details for the file django_taggit-0.23.0-py2.py3-none-any.whl.

File metadata

  • Download URL: django_taggit-0.23.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 44.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.9.1 pkginfo/1.3.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/3.6.6

File hashes

Hashes for django_taggit-0.23.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 db4430ec99265341e05d0274edb0279163bd74357241f7b4d9274bdcb3338b17
MD5 85cbd59c82dc959ada82882a7f8ef737
BLAKE2b-256 39ed3607874788740674b7533586fc6b3e2249b5c5e9585882f0c8709e9a8c36

See more details on using hashes here.

Supported by

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