Skip to content
Yandex Captcha (cleanweb) form field/widget integration app.
Python Shell
Branch: master
Clone or download
Latest commit f4f6c48 Apr 4, 2013
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
yacaptcha 5 commit Apr 3, 2013
.gitignore 4 commit Apr 3, 2013
LICENSE 1 commit Apr 3, 2013
README.md Update README.md Apr 4, 2013

README.md

===== Django YaCaptcha

Django YaCaptcha - Yandex Captcha (cleanweb) form field/widget integration app.

Uses https://github.com/coagulant/cleanweb

Quick start

  1. Add "yacaptcha" to your INSTALLED_APPS setting like this:
INSTALLED_APPS = (
        'yacaptcha',
)
  1. Get the API key http://api.yandex.ru/cleanweb and add to your project settings:
YACAPTCHA_KEY = 'your_api_key'
  1. Add YaCaptchaField in your form like this::
from yacaptcha.fields import YaCaptchaField
class TestForm(forms.Form):
        name = forms.CharField()
        captcha = YaCaptchaField()
  1. Add form field widget template You may create your own template for field widget. For this add in project settings:
YACAPTCHA_WIDGET_TEMPLATE = 'path_to_widget.html'
Or use default widget.html from package django-yacaptcha/templates/yacaptcha/widget.html
  1. If you use django-registration, you may use registartion backend with yacaptcha field like this:
url(r'^accounts/', include('yacaptcha.backends.default.urls')), # yacaptcha backend for registration form
(r'^accounts/', include('registration.backends.default.urls')),
You can’t perform that action at this time.