Login

Tag "anti-spam"

Snippet List

Honeypot Field

Simple anti-spam field which will cause the form to raise a `ValidationError` if the value in this field changes. Displays as a CSS hidden `<input type="text" />` field. If you specify a `class` in the `attrs` of the widget, the default `style="display:none;"` won't be rendered with the widget so that you can use a predefined CSS style to do your hiding instead. You can also cause the widget to be wrapped in an html comment to ensure it is not visible to the end user: class EmailForm(Form): email = EmailField() website = HoneypotField(widget=HoneypotWidget( attrs={'class':'fish'}, html_comment=True))

  • spam
  • anti-spam
  • bot
Read More

Captcha Middleware (Template)

A middleware we are using to stop "spam" on Curse. It makes the user fill in a captcha box whenever they submit a form unless a cookie is set (which expires by default after 6 hours) See also [the python script](http://www.djangosnippets.org/snippets/127/)

  • captcha
  • anti-spam
Read More

2 snippets posted so far.