Getting Started¶
To get started using django-taggit
simply install it with
pip
:
$ pip install django-taggit
Add "taggit"
to your project’s INSTALLED_APPS
setting.
Run ./manage.py syncdb or ./manage.py migrate if using migrations.
Note
If you are using South you’ll have to add the following setting, since taggit uses Django migrations by default:
SOUTH_MIGRATION_MODULES = {
'taggit': 'taggit.south_migrations',
}
And then to any model you want tagging on do the following:
from django.db import models
from taggit.managers import TaggableManager
class Food(models.Model):
# ... fields here
tags = TaggableManager()