You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Example: Django form with server-side verification #125
examples/ has runnable integrations for Hono, Supabase, FastAPI and a plain Node contact form. A Django example would cover a lot of Python users.
What to do
Add examples/django/ with:
a form view whose template renders the checkbox widget
server-side verification of the posted fcaptcha_token against /turnstile/v0/siteverify or /api/token/verify (a small form field or a validator is fine)
tests for a valid, a replayed and a missing token, in the style of examples/fastapi/test_main.py
a README with how to run it against a local FCaptcha server
Bonus: a note on using django-recaptcha unchanged by setting RECAPTCHA_DOMAIN to your FCaptcha server, which v1.45.0 makes possible.
Done when
The example runs from its README, and a link is added under "Runnable examples" in the main README.
The missing piece here is still a runnable examples/django app with tests. Keep the verification secret server-side, verify before the protected action, and cover missing, rejected/replayed, and unavailable verification as well as success. Please use the current documented site-key/hostname/action checks. A focused PR with its run/test commands would be helpful.
Activity
cport1 commentedon Nov 17, 2026
Thanks, @Vedant-200. Please go ahead with the runnable example. There is now a Django integration guide in INSTALLATION.md, so please reuse that contract rather than duplicating the guide: https://github.com/WebDecoy/FCaptcha/blob/main/INSTALLATION.md
The missing piece here is still a runnable examples/django app with tests. Keep the verification secret server-side, verify before the protected action, and cover missing, rejected/replayed, and unavailable verification as well as success. Please use the current documented site-key/hostname/action checks. A focused PR with its run/test commands would be helpful.