django-utils v0.3.0 documentation

This Page

Akismet

A simple client to use for communicating with the Akismet spam-catching service.

You can sign up for access to their API here: https://akismet.com/signup/#free

The AkismetClient class supports API key verification and checking arbitrary text for spam.

class djutils.utils.akismet.AkismetClient(object)
__init__(self, key, blog_url)
Parameters:
  • key – the API key for accessing Akismet
  • blog_url – the URL to the wordpress blog you used to register key (can be ‘’)
verify_key(self)

returns True/False whether the key provided is valid, defaulting to False in the event of any error condition.

is_spam(self, comment, ip, author='', email='')
Parameters:
  • comment – the comment text, contact email, whatever you want to check
  • ip – the IP address the content originated from
  • author – the name provided by the end user
  • email – the email address provided by the end user

Determine whether the comment is spam, returns True/False, defaulting to False in the event of any error condition