Akismet spam detection¶
Akismet is used out of the box when the AKISMET_API_KEY
setting is defined:
AKISMET_API_KEY = "your-api-key"
This can also be enabled explicitly:
FLUENT_CONTENTS_USE_AKISMET = True # Enabled by default when AKISMET_API_KEY is set.
The following settings are optional:
AKISMET_BLOG_URL = "http://example.com" # Optional, to override auto detection
AKISMET_IS_TEST = False # Enable to make test runs
When spam is detected, the default behavior depends on the spam score. Obvious spam is discarded with an HTTP 400 response, while possible spam is marked for moderation.
The FLUENT_COMMENTS_AKISMET_ACTION setting can be one of these values:
auto
chooses betweenmoderate
,soft_delete
anddelete
based on the spam score.moderate
will always mark the comment for moderation.soft_delete
will mark the comment as moderated + removed, but it can still be seen in the admin.delete
will outright reject posting the comment and respond with a HTTP 400 Bad Request.
Tip
By default, Akismet will not report any post from the Django superuser as spam. Comments with the name “viagra-test-123” will always be flagged as spam.
Warning
Akismet is a third party service by Automattic. Note that GDPR Compliance is next-to-impossible with this service.