+from akismet import *\r
from base import *\r
from tag import Tag\r
\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
+ if api.key is None:\r
+ print "problem" # raise APIKeyError\r
+ elif not api.verify_key():\r
+ print "problem" # raise APIKeyError()\r
+ else:\r
+ if api.comment_check(comment, data):\r
+ return True\r
+ else:\r
+ return False\r
+ return data\r
+\r
class Meta:\r
app_label = 'forum'\r
\r