Login

Tag "bot"

Snippet List

Web crawler/bot detection and blocking middleware

Sets request.is_crawler Allow bot lockout from certain urls in urlconf ,add view parameter 'deny_crawlers' ex. url(r'^foo/$', 'views.foo',{'deny_crawlers' : True},name='foo') view param is removed after middleware pass.

  • middleware
  • bot
  • google
  • yahoo
  • crawler
  • robot
  • googlebot
  • cuil
  • slurp
Read More

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

2 snippets posted so far.