django-taggit
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.
Metadata
Release files for django-taggit 0.18.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django-taggit-0.18.3.tar.gz | 42.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_taggit-0.18.3-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 85.3 kB
Release files / django-taggit-0.18.3.tar.gz
| Download URL | django-taggit-0.18.3.tar.gz |
|---|---|
| Size | 42.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fafacff0dc25e3bd06c29d3566e417ec0f4fc59358521ab7f4fef2d168a51c27
|
|
BLAKE2b-256 checksum How to use checksums |
1a2ca4c2b6d97ce47d1d65cb4866bf7054a5020f10fb7c086f260257c98eacf5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / django_taggit-0.18.3-py2.py3-none-any.whl
| Download URL | django_taggit-0.18.3-py2.py3-none-any.whl |
|---|---|
| Size | 43.2 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
ebe1951aa4715e7f6f0347ee0e00646b8d140e54e772dec350b4bc0619c6b25f
|
|
BLAKE2b-256 checksum How to use checksums |
5584a8a5953b0608b4d4e02532cee1adbbd3e32f123892cc00c9b61ccc093a1a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |