Login

Tag "antispam"

Snippet List

AntiSpamForm

A general AntiSpamForm using some tricks to prevent spam based on current [django.contrib.comments.forms](http://code.djangoproject.com/browser/django/trunk/django/contrib/comments/forms.py). It uses a timestamp, a security hash and a honeypot field. See [AntiSpamModelForm](http://www.djangosnippets.org/snippets/1856/) too.

  • forms
  • spam
  • form
  • antispam
Read More

AntiSpamModelForm

A general AntiSpamModelForm using some tricks to prevent spam based on current [django.contrib.comments.forms](http://code.djangoproject.com/browser/django/trunk/django/contrib/comments/forms.py). It uses a timestamp, a security hash and a honeypot field. See [AntiSpamForm](http://www.djangosnippets.org/snippets/1925/) too.

  • forms
  • spam
  • form
  • antispam
Read More

Prevent Django newcomments spam with Akismet (reloaded)

This is a rewrite of [snippet #1006](http://www.djangosnippets.org/snippets/1006/) to use the moderation features available in Django's comments framework. This is more customizable than the signals approach and works well if other moderation features are being used. If you want to make comments that are flagged as spam become hidden instead of deleted, change the allow() method to moderate(). [See the blog post here](http://sciyoshi.com/blog/2009/jul/17/prevent-django-newcomments-spam-akismet-reloaded/)

  • akismet
  • spam
  • comments
  • antispam
  • newcomments
Read More

Alternative to Captchas (Without Human Interaction)

This security field is based on the perception that spambots post data to forms in very short or very long regular intervals of time, where it takes reasonable time to fill in a form and to submit it for human beings. Instead of captcha images or Ajax-based security interaction, the SecurityField checks the time of rendering the form, and the time when it was submitted. If the interval is within the specific range (for example, from 5 seconds till 1 hour), then the submitter is considered as a human being. Otherwise the form doesn't validate. Usage example: class TestForm(forms.Form): prevent_spam = SecurityField() # ... other fields ... The concept works only for unbounded forms.

  • captcha
  • security
  • form
  • field
  • antispam
  • antibot
Read More

hide_email

This templatetag obsfucate mailto link and hide it while not happen onmouseover event. Usage: {% hide_email object.author object.author.email %} Output: <a href="mailto:[email protected]" onmouseover="var a=String.fromCharCode(79+35,14+103,66+41,30+71,49+49,16+81); var b=String.fromCharCode(14+50,9+105,61+56,81+26,92+9,2+96,20+77,13+33,75+24,32+79,31+78); this.href=['mail','to:',a,b].join('');">rukeba</a> Based on [Email Obsfucator](http://www.djangosnippets.org/snippets/536/) and [forums at Yandex.Market](http://market.yandex.ru/forums/). Example at [my guitar blog](http://rukeba.com/ra/2008/01/15/oasis-wonderwall/)

  • templatetag
  • email
  • antispam
Read More

5 snippets posted so far.