=====
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:
<pre>
INSTALLED_APPS = (
'yacaptcha',
)
</pre>
2. Get the API key http://api.yandex.ru/cleanweb and add to your project settings:
<pre>
YACAPTCHA_KEY = 'your_api_key'
</pre>
3. Add YaCaptchaField in your form like this::
<pre>
from yacaptcha.fields import YaCaptchaField
class TestForm(forms.Form):
name = forms.CharField()
captcha = YaCaptchaField()
</pre>
4. Add form field widget template
You may create your own template for field widget. For this add in project settings:
<pre>
YACAPTCHA_WIDGET_TEMPLATE = 'path_to_widget.html'
</pre>
Or use default widget.html from package django-yacaptcha/templates/yacaptcha/widget.html
5. If you use django-registration, you may use registartion backend with yacaptcha field like this:
<pre>
url(r'^accounts/', include('yacaptcha.backends.default.urls')), # yacaptcha backend for registration form
(r'^accounts/', include('registration.backends.default.urls')),
</pre>
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:
<pre>
INSTALLED_APPS = (
'yacaptcha',
)
</pre>
2. Get the API key http://api.yandex.ru/cleanweb and add to your project settings:
<pre>
YACAPTCHA_KEY = 'your_api_key'
</pre>
3. Add YaCaptchaField in your form like this::
<pre>
from yacaptcha.fields import YaCaptchaField
class TestForm(forms.Form):
name = forms.CharField()
captcha = YaCaptchaField()
</pre>
4. Add form field widget template
You may create your own template for field widget. For this add in project settings:
<pre>
YACAPTCHA_WIDGET_TEMPLATE = 'path_to_widget.html'
</pre>
Or use default widget.html from package django-yacaptcha/templates/yacaptcha/widget.html
5. If you use django-registration, you may use registartion backend with yacaptcha field like this:
<pre>
url(r'^accounts/', include('yacaptcha.backends.default.urls')), # yacaptcha backend for registration form
(r'^accounts/', include('registration.backends.default.urls')),
</pre>
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file django-yacaptcha-0.0.6.tar.gz.
File metadata
- Download URL: django-yacaptcha-0.0.6.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
703747b5cd3faa57d96ff900a55fb0784f95337b924278a357970cef642b15b0
|
|
| MD5 |
ec366d7081025b316f8c5c91d3761201
|
|
| BLAKE2b-256 |
71048ba0f6ad6b884157bbc213342472dce477517d368aa21eddc9879c088356
|