Commit cae0efe2 by Alex Gaynor

Fixed #20. Deleting coercing unicode TaggedItems to unicode sohuld now be safe on older pythons.

parent e81f3604
......@@ -33,7 +33,7 @@ class TaggedItemBase(models.Model):
tag = models.ForeignKey(Tag, related_name="%(app_label)s_%(class)s_items")
def __unicode__(self):
return "%s tagged with %s" % (self.content_object, self.tag)
return u"%s tagged with %s" % (self.content_object, self.tag)
class Meta:
abstract = True
......
......@@ -82,7 +82,7 @@ class TaggableManagerTestCase(BaseTaggingTest):
strawberry.tags.add("red")
apple.delete()
self.assert_tags_equal(strawberry.tags.all(), ["red"])
def test_lookup_by_tag(self):
apple = self.food_model.objects.create(name="apple")
apple.tags.add("red", "green")
......
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