【发布时间】:2014-09-05 00:30:07
【问题描述】:
我无法为模型中的多个标签找到好的答案或解决方案。我发现唯一接近的是:
How can I limit django-taggit to accept only lowercase words?
这是我当前的代码:
from taggit.managers import TaggableManager
from taggit.models import TaggedItemBase
class TaggedStory(TaggedItemBase):
content_object = models.ForeignKey("Story")
class TaggedSEO(TaggedItemBase):
content_object = models.ForeignKey("Story")
class Story(models.Model):
...
tags = TaggableManager(through=TaggedStory, blank=True, related_name='story_tags')
...
seo_tags = TaggableManager(through=TaggedSEO, blank=True, related_name='seo_tags')
【问题讨论】:
标签: python django django-taggit