{"id":24370759,"url":"https://github.com/christianwgd/django-friendly-captcha","last_synced_at":"2025-04-10T18:07:03.404Z","repository":{"id":37543623,"uuid":"346046866","full_name":"christianwgd/django-friendly-captcha","owner":"christianwgd","description":"Django field/widget for Friendly Capture (https://friendlycaptcha.com).","archived":false,"fork":false,"pushed_at":"2024-04-12T13:20:34.000Z","size":61,"stargazers_count":4,"open_issues_count":4,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-04-12T19:08:06.203Z","etag":null,"topics":["captcha","django","friendly-captcha"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/christianwgd.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null}},"created_at":"2021-03-09T15:08:54.000Z","updated_at":"2024-04-15T14:06:12.748Z","dependencies_parsed_at":"2024-03-26T12:29:34.450Z","dependency_job_id":"e0dfbdcf-5886-4f36-b240-69c77c71c59c","html_url":"https://github.com/christianwgd/django-friendly-captcha","commit_stats":{"total_commits":33,"total_committers":3,"mean_commits":11.0,"dds":"0.36363636363636365","last_synced_commit":"368ff4af04863f4ac2609c28addf8c8346ad2a19"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christianwgd%2Fdjango-friendly-captcha","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christianwgd%2Fdjango-friendly-captcha/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christianwgd%2Fdjango-friendly-captcha/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christianwgd%2Fdjango-friendly-captcha/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/christianwgd","download_url":"https://codeload.github.com/christianwgd/django-friendly-captcha/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248266620,"owners_count":21075206,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["captcha","django","friendly-captcha"],"created_at":"2025-01-19T04:48:12.086Z","updated_at":"2025-04-10T18:07:03.379Z","avatar_url":"https://github.com/christianwgd.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Django Friendly Captcha\n=======================\n\n.. image:: https://img.shields.io/pypi/v/django-friendly-captcha\n    :target: https://pypi.python.org/pypi/django-friendly-captcha\n\n.. image:: https://img.shields.io/pypi/dm/django-friendly-captcha\n    :alt: PyPI - Downloads\n    :target: https://pypi.python.org/pypi/django-friendly-captcha\n\nDjango field/widget for Friendly Captcha (https://friendlycaptcha.com).\n\n\n\nInstallation\n------------\n\nLatest version:\n\n    pip install -e git+git://github.com/christianwgd/django-friendly-captcha.git#egg=django-friendly-captcha\n\nStable version:\n\n    pip install django-friendly-captcha\n\nDocumentation\n-------------\n\nUsage\n#####\n\nAdd 'friendly_captcha' to your INSTALLED_APPS.\n\n.. code-block::\n\n    INSTALLED_APPS = [\n        ...\n        'friendly_captcha',\n    ]\n\nAdd the captcha field to your form:\n\n.. code-block::\n\n    from friendly_captcha.fields import FrcCaptchaField\n\n\n    class ContactForm(forms.ModelForm):\n\n        class Meta:\n            model = ContactMessage\n            fields = (\n                'name', 'email', 'subject', 'text'\n            )\n\n        captcha = FrcCaptchaField()\n\nAs of version 0.1.7 the javascript static assets are included in\nthe widget, so there is no need to do that in your project templates.\nVersion 0.1.10 includes friendly captcha version 0.9.15 javascript files.\nIf you need a different version you can set these by providing\nthem in your settings:\n\n.. code-block::\n\n    FRC_WIDGET_MODULE_JS = 'https://unpkg.com/friendly-challenge@0.9.8/widget.module.min.js'\n    FRC_WIDGET_JS = 'https://unpkg.com/friendly-challenge@0.9.8/widget.min.js'\n\nFor version 0.1.6 and below you need to include the script tags from\nFriendly Captcha to your forms template\n(see https://docs.friendlycaptcha.com/#/installation)\n\n.. code-block::\n\n    \u003cscript type=\"module\" src=\"https://unpkg.com/friendly-challenge@0.9.8/widget.module.min.js\" async defer\u003e\u003c/script\u003e\n    \u003cscript nomodule src=\"https://unpkg.com/friendly-challenge@0.9.8/widget.min.js\" async defer\u003e\u003c/script\u003e\n\nIf you build up your form from single fields, dont't forget to include\nthe captcha form field.\n\nConfiguration\n#############\n\nRegister to Friendly Captcha at https://friendlycaptcha.com/signup to get your\nsitekey and captcha secret.\n\n.. code-block::\n\n    FRC_CAPTCHA_SECRET = '\u003cyourCaptchaSecret'\n    FRC_CAPTCHA_SITE_KEY = '\u003cyourCaptchaSiteKey\u003e'\n\n.. code-block::\n\n    FRC_CAPTCHA_VERIFICATION_URL = 'https://api.friendlycaptcha.com/api/v1/siteverify'\n\nIn default the form will fail with an error ('Captcha test failed'). You can change\nthis behaviour by setting FRC_CAPTCHA_FAIL_SILENT to True.\n\n.. code-block::\n\n    FRC_CAPTCHA_FAIL_SILENT = False\n\nWhen setting FAIL_SILENT to True it's up to you to handle captcha verification:\n\n.. code-block::\n\n    # in your form view\n    def form_valid(self, form):\n        captcha_verified = form.cleaned_data['captcha']\n        if captcha_verified:\n            # send mail or whatever ...\n        else:\n            # captcha verification failed, do nothing ...\n\nAs of version 0.1.11 there's a new settings option to get a mocked\nvalue from the captcha verification. You can set FRC_CAPTCHA_MOCKED_VALUE\nto True or False, depending on the vaule you need for testing.\nThe default value is unset which equals to None.\n\n.. code-block::\n\n    FRC_CAPTCHA_MOCKED_VALUE = None|False|True\n\nCustom widget attributes\n########################\n\nYou can add custom widget attrs to the FrcCaptchaField like in any other\nDjango field:\n\n.. code-block::\n\n    captcha = FrcCaptchaField(widget=FrcCaptchaWidget(attrs={'data-start': 'auto'}))\n\nSee https://docs.friendlycaptcha.com/#/widget_api for additional widget attrs.\nThe data-lang attr is set from your Django configured language.\n\nLogging\n#######\n\nIf you want to log the results of the captcha verifications you can\nadd a logger to your logging configuration:\n\n.. code-block::\n\n    'django.friendly_captcha': {\n        'handlers': ['default'],\n        'level': 'INFO',\n    }\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchristianwgd%2Fdjango-friendly-captcha","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchristianwgd%2Fdjango-friendly-captcha","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchristianwgd%2Fdjango-friendly-captcha/lists"}