X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/08dbd720394d897a295fd610d30990b9fad26a04..966d8531e88d13dcec80c30aa201cff125eca870:/forum/models/node.py diff --git a/forum/models/node.py b/forum/models/node.py index dc292fb..cf69233 100644 --- a/forum/models/node.py +++ b/forum/models/node.py @@ -1,4 +1,3 @@ -from forum.akismet import * from base import * from tag import Tag @@ -31,12 +30,13 @@ class NodeContent(models.Model): def tagname_list(self): if self.tagnames: - return [name for name in self.tagnames.split(u' ')] + t = [name.strip() for name in self.tagnames.split(u' ') if name] + return [name.strip() for name in self.tagnames.split(u' ') if name] else: return [] def tagname_meta_generator(self): - return u','.join([unicode(tag) for tag in self.tagname_list()]) + return u','.join([tag for tag in self.tagname_list()]) class Meta: abstract = True @@ -255,21 +255,6 @@ class Node(BaseModel, NodeContent): super(Node, self).save(*args, **kwargs) if tags is not None: self.tags = tags - @staticmethod - def isSpam(comment, data): - #api = Akismet() - - #if not api.key: - # return False - #else: - # if api.comment_check(comment, data): - # return True - # else: - # return False - # return data - return False - - class Meta: app_label = 'forum'