2
我創建了以下的TagBase,每個類別都可以有子類別... 這是否行之有效?我如何覆蓋TaggableManager中的add函數?在Django-Taggit中擴展TagBase
class Category(TagBase):
parent = models.ForeignKey('self', blank=True, null=True,
related_name='child')
description = models.TextField(blank=True, help_text="Optional")
class Meta:
verbose_name = _('Category')
verbose_name_plural = _('Categories')