
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
django-puzzlecaptcha
Advanced tools
PuzzleCaptcha: Simplified Math CAPTCHA Using Pillow Image Library
pip install django-puzzlecaptcha
Add puzzlecaptcha
to your INSTALLED_APPS
:
INSTALLED_APPS = [
...
'puzzlecaptcha',
...
]
In your settings.py
, you can customize the puzzlecaptcha behavior:
PUZZLECAPTCHA = {
"CAPTCHA_FONT_SIZE": 35,
"CAPTCHA_IMAGE_SIZE": (150, 50),
"CAPTCHA_NOISE_LINES": 20,
"CAPTCHA_NOISE_LINES_WIDTH": 2,
"CAPTCHA_NOISE_COLOR": "black",
"CAPTCHA_FOREGROUND_COLOR": "black",
"CAPTCHA_BACKGROUND_COLOR": "white",
"CAPTCHA_CACHE_PREFIX": "puzzlecaptcha",
"CAPTCHA_CACHE_BACKEND": "default",
"CAPTCHA_TIMEOUT": 300,
}
In your project's urls.py
:
from puzzlecaptcha.forms import AdminAuthenticationForm
admin.site.login_form = AdminAuthenticationForm
admin.site.login_template = 'puzzlecaptcha/admin_login.html'
urlpatterns = [
path("admin/", admin.site.urls),
....
]
from puzzlecaptcha.field import MathCaptchaField
class AuthenticationForm(form.Form):
captcha = MathCaptchaField()
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License
If you encounter any issues or have questions, please open an issue on GitHub.
FAQs
PuzzleCaptcha: Simplified Math CAPTCHA Using Pillow Image Library
We found that django-puzzlecaptcha demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.