Alexander Solovyov committed ace2aad

tag translation support added

Comments (0)

Files changed (2)


     A tag.
     name = models.CharField(_('name'), max_length=50, unique=True, db_index=True, validator_list=[isTag])
+    translation = models.CharField(_('name translation'), max_length=50, blank=True)
     objects = TagManager()
     def get_absolute_url(self):
         return reverse('post_by_tag',
+    def get_name(self):
+        if self.translation:
+            return self.translation
+        else:
+            return
 class TaggedItem(models.Model):
     Holds the relationship between a tag and the item being tagged.
+ALTER TABLE tag ADD COLUMN translation varchar(50) NOT NULL;