/usr/lib/python2.7/dist-packages/flask_wtf/recaptcha/fields.py is in python-flaskext.wtf 0.12-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | from wtforms.fields import Field
from . import widgets
from .validators import Recaptcha
__all__ = ["RecaptchaField"]
class RecaptchaField(Field):
widget = widgets.RecaptchaWidget()
# error message if recaptcha validation fails
recaptcha_error = None
def __init__(self, label='', validators=None, **kwargs):
validators = validators or [Recaptcha()]
super(RecaptchaField, self).__init__(label, validators, **kwargs)
|