Commit 73f45810 by Alex Gaynor

Merge commit 'origin/master'

parents e3f630ce fd048036
django-taggit django-taggit
============= =============
Is a simpler approach to tagging with Django. Just add a TagManager to your Is a simpler approach to tagging with Django. Just add a TaggableManager to your
model and go: model and go:
from django.db import models from django.db import models
from taggit.managers import TagManager from taggit.managers import TaggableManager
class Food(models.Model): class Food(models.Model):
# ... fields here # ... fields here
tags = TagManager() tags = TaggableManager()
Then you can use the API like so: Then you can use the API like so:
......
...@@ -26,6 +26,8 @@ class TaggableManager(object): ...@@ -26,6 +26,8 @@ class TaggableManager(object):
self.creates_table = False self.creates_table = False
self.db_column = None self.db_column = None
self.choices = None self.choices = None
self.creation_counter = models.Field.creation_counter
models.Field.creation_counter += 1
def __get__(self, instance, type): def __get__(self, instance, type):
manager = _TaggableManager() manager = _TaggableManager()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment