我無法找到一個好的答案或模型中的多個標籤的解決方案。我發現接近的唯一的事情是這樣的: How can I limit django-taggit to accept only lowercase words? 這裏是我當前的代碼: def clean_tags(self):
"""
Force all tags to lowercase.
"""
tags
我試圖安裝Django-taggit,但我得到這個錯誤回溯: Exception:
Traceback (most recent call last):
File "/home/filipefr2/lib/python2.7/pip-1.5-py2.7.egg/pip/basecommand.py", line 122, in main
status = self.run(o
我想選擇3個最近發佈的項目,與任何標籤類似的當前項目(和其他一些過濾器太) 找不到有效的方式來做到這一點,有數據庫中有很多'item'。 from taggit_autosuggest.managers import TaggableManager
class Item(models.Model):
publish_date = DateField()
tags = Tag
所以我想用django和djanggo-taggit做一個簡單的博客。 這是我的models.py from django.db import models
from django.db.models import permalink
from taggit.managers import TaggableManager
class Post(models.Model):
tit