Skip to content
Django tagging with multilingual, synonyms and hierarchy!
Python Shell
Latest commit 7eb9676 Nov 29, 2015 @svetlyak40wt Merge pull request #18 from flebel/add_support_for_django16
Set the Django 1.6+ mandatory 'fields' attribute.


Django Tagging NG

This is a enhanced tagging application for Django projects

- For installation instructions, see the file "INSTALL.txt" in this directory

- For detailed instructions on how to configure and know all possibilities of this application, see the file "OVERVIEW.txt"

Note that this application requires Python 2.3 or later, and Django 0.96 or later. You can obtain Python from and Django from


1.- Register a model:

   from django.db import models
   import tagging
   from shop.apps.products.models import Widget

   class Widget(models.Model):
       name = models.CharField(max_length=50)


2.- Use it

   w = Widget.objects.get(...)

   from tagging.models import Tag, TaggedItem
   house_tag = Tag.objects.get(name='house')
   thing_tag = Tag.objects.get(name='thing')

    - Set tags for instance:
    w.tags = 'tag1 tag2'

    - Get tag for instance:
     [<Tag: tag1>, <Tag: tag2>]

    - Retrive instances with tag1 AND tag2
   TaggedItem.objects.get_by_model(Widget, [house_tag, thing_tag])
   [<Widget: pk=1>]

    - Retrieve filtered instances with 'tag1'
   TaggedItem.objects.get_by_model(Widget.objects.filter(price__lt=50), 'house')

    - Get all tags for a model:
   [<Tag: tag1>, <Tag: tag2>>]

    - Get tags for a model with usage counts:

    - Get related tags (retrieve tags used by model instances which are also tagged with tag1 and tag2)
    Widget.tags.related('tag1', min_count=1)
    [<Tag: tag2>]
    Widget.tags.related(['tag1', 'tag2'], min_count=1)


This application is based on the original code, written by:
    Jonathan Buchanan <>

Enhanced by:
    Alexander Artemenko <>
    Antti Kaihola <>
    GW [] <>
    Concha Labra



Something went wrong with that request. Please try again.