🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

django-yacaptcha

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

django-yacaptcha

Simple captcha with Yandex API.

pipPyPI
Version
0.0.6
Maintainers
1

===== Django YaCaptcha

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

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

Quick start

  • Add "yacaptcha" to your INSTALLED_APPS setting like this:
INSTALLED_APPS = (
        'yacaptcha',
)
YACAPTCHA_KEY = 'your_api_key'
  • Add YaCaptchaField in your form like this::
from yacaptcha.fields import YaCaptchaField
class TestForm(forms.Form):
        name = forms.CharField()
        captcha = YaCaptchaField()
  • 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

5. 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')),

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts