Python captcha.fields.ReCaptchaField() Examples
The following are 1
code examples of captcha.fields.ReCaptchaField().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
captcha.fields
, or try the search function
.
Example #1
Source File: forms.py From arches with GNU Affero General Public License v3.0 | 5 votes |
def __init__(self, *args, **kwargs): self.enable_captcha = kwargs.pop("enable_captcha", False) super(ArchesUserCreationForm, self).__init__(*args, **kwargs) attrs = {"theme": "clean"} if self.enable_captcha is True: try: self.fields["captcha"] = ReCaptchaField(attrs) except Exception as e: logger = logging.getLogger(__name__) logger.warn(e)