一个Django应用程序,为你的Django评论提供Akismet和关键字阻塞。
django-comments-spamfighter的Python项目详细描述
此django应用程序为django的评论应用程序提供了一个仲裁类,该类提供:
- 根据Akismet垃圾邮件数据库检查传入的评论,并阻止 直接或将其添加到审核队列中。
- 根据预定义的关键字检查传入的注释,并阻止它们 直接或将它们添加到审核队列中。这些关键字可以是 简单的字符串或强大的正则表达式。
文档已联机:
http://docs.mahner.org/django-comments-spamfighter/
快速安装
下面是一个快速安装指南,供熟悉注释的用户使用 适度:
from comments_spamfighter.moderation import SpamFighterModerator class EntryModerator(SpamFighterModerator): # Regular options by django's contributed CommentModerator auto_moderate_field = 'created' email_notification = True # Spam fighter options # Check with Akismet for spam akismet_check = False # If Akismet marks this message as spam, delete it instantly (False) or # add it the comment the moderation queue (True). Default is True. akismet_check_moderate = True # Do a keyword check keyword_check = True # If a keyword is found, delete it instantly (False) or add the comment to # the moderation queue (True). Default is False. keyword_check_moderate = False moderator.register(Entry, EntryModerator)