Skip to content

Commit

Permalink
Clarify TagBase and ItemBase as python2 unicode compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
EnTeQuAk committed Mar 23, 2013
1 parent a7bf54f commit d9fb9b1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions taggit/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
from django.db import models, IntegrityError, transaction
from django.template.defaultfilters import slugify as default_slugify
from django.utils.translation import ugettext_lazy as _, ugettext
from django.utils.encoding import python_2_unicode_compatible


@python_2_unicode_compatible
class TagBase(models.Model):
name = models.CharField(verbose_name=_('Name'), unique=True, max_length=100)
slug = models.SlugField(verbose_name=_('Slug'), unique=True, max_length=100)
Expand Down Expand Up @@ -59,6 +61,7 @@ class Meta:
verbose_name_plural = _("Tags")


@python_2_unicode_compatible
class ItemBase(models.Model):
def __str__(self):
return ugettext("%(object)s tagged with %(tag)s") % {
Expand Down

0 comments on commit d9fb9b1

Please sign in to comment.