Tag: captcha / Back

Another few hours of my life lost due to spammers. (And a few Mac OS quirks i don't want to get into now : ) ). Anyway.. If you have any kind of form on your website you are guaranteed that you will receive spam in one form or another. To make it the least annoying for your real customers and users I think it's the best way to employ some kind of passive spam checking.

I previously only heard of Akismet which is only free for non-commercial users. But since i don't want to get into trouble I made a quick google search and found TypePad AntiSpam - The nice thing about it? It is completely free (at least right now) - but provides the same API as akismet.

So I simply downloaded the Python Akismet library and created a very simple utility function and base form in django to do the checking. So only when spam is recognized the user will have to fill out the captcha.

The whole magic lies in simply changing the baseurl:

from akismet import Akismet
# base url for TypePad AntiSpam would be:
#   api.antispam.typepad.com/1.1/

Akismet.baseurl = settings.AKISMET_BASEURL


You can also take a look at my full code for the form, which uses the Captcha Field from SCT.
Hey, we have Signatures !!! Great, isn't it ? ;)

Posted by Herbert Poul

Assigned Tags: spam, captcha, django, akismet, typepad antispam

0 Comments

Attachments: captcha_check.png (185.9 KB) , spamcheckedform.py (2.9 KB)

Page 1

Archive

RSS Feed

Personal website and blog of Herbert Poul. Also check out my Photo Gallery.




Herby's Photo Gallery

Subscriptions

User

You are not logged in.
Login
Register