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.1 or greater.

For more info checkout 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.9.1.tar.gz (18.0 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: django-taggit-0.9.1.tar.gz
  • Upload date:
  • Size: 18.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for django-taggit-0.9.1.tar.gz
Algorithm Hash digest
SHA256 bb9cee4d2266ed05e03c45b74e203aff9b8b94a2ce4292325ac64da1ad69b2a8
MD5 1ddca9dd55fb629a0cc03c4b0481a1ea
BLAKE2b-256 ca2143d2a1fadcaa9276fca58fab0c9528c9433f69ca07b4888a729f9512a096

See more details on using hashes here.

Supported by

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