-from forum.akismet import *\r
from base import *\r
from tag import Tag\r
\r
\r
def tagname_list(self):\r
if self.tagnames:\r
- return [name for name in self.tagnames.split(u' ')]\r
+ t = [name.strip() for name in self.tagnames.split(u' ') if name]\r
+ return [name.strip() for name in self.tagnames.split(u' ') if name]\r
else:\r
return []\r
\r
def tagname_meta_generator(self):\r
- return u','.join([unicode(tag) for tag in self.tagname_list()])\r
+ return u','.join([tag for tag in self.tagname_list()])\r
\r
class Meta:\r
abstract = True\r
super(Node, self).save(*args, **kwargs)\r
if tags is not None: self.tags = tags\r
\r
- @staticmethod\r
- def isSpam(comment, data):\r
- #api = Akismet()\r
-\r
- #if not api.key:\r
- # return False\r
- #else:\r
- # if api.comment_check(comment, data):\r
- # return True\r
- # else:\r
- # return False\r
- # return data\r
- return False\r
-\r
-\r
class Meta:\r
app_label = 'forum'\r
\r