Added @tag command for easily manipulating tags. Fixed some bugs at the same time.

This commit is contained in:
Griatch 2013-12-02 15:40:02 +01:00
parent 6d06ab5338
commit 88d103b55f
4 changed files with 105 additions and 6 deletions

View file

@ -551,7 +551,8 @@ class TagHandler(object):
def clear(self):
"Remove all tags from the handler"
_GA(self.obj, self._m2m_fieldname).filter(db_category__startswith=self.prefix).clear()
for tag in _GA(self.obj, self._m2m_fieldname).filter(db_category__startswith=self.prefix):
_GA(self.obj, self._m2m_fieldname).remove(tag)
self._recache()
def all(self):