Skip to main content

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

Project description

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.4.5 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.12.3.tar.gz (48.7 kB view details)

Uploaded Source

Built Distribution

django_taggit-0.12.3-py2.py3-none-any.whl (37.4 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

File hashes

Hashes for django-taggit-0.12.3.tar.gz
Algorithm Hash digest
SHA256 6aa596a5b5e210028698d7d48f8d619dbf00f438733864de12def06411ab885e
MD5 6ed2bde3e7de07c902f03afa9f36a3b1
BLAKE2b-256 2b6976143734d76cec80d078145702e37adb710b04fc51bf152a1e6533f7e1e4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_taggit-0.12.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 6bb5dd1dfa3032e97b9050339893ee7686dd11bb8524f7d9463dc4db604df935
MD5 2c59192f89d4d3b253fdaeb6a0beddc9
BLAKE2b-256 07f977f7938ebdba80941d23e55dc6e4ba989874509fdaed6ed462e0afad36c0

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