You are here: Home / LBN / Up2date / Core Linux / BastionLinux 36 / python3-flask-wtf-decorators-0.1.2-0.7.20200715.7fa5a26.fc36.noarch

python3-flask-wtf-decorators-0.1.2-0.7.20200715.7fa5a26.fc36.noarch

Package Attributes
RPM  python3-flask-wtf-decorators-0.1.2-0.7.20200715.7fa5a26.fc36.noarch.rpm Architecture  noarch Size  6403 Created  2022/09/20 02:35:15 UTC
Package Specification
Summary Use decorators to validate forms
Group Unspecified
License MIT
Home Page https://github.com/simpleapples/flask-wtf-decorators
Description

Flask-WTF-Decorators is easy to use. You can define a view that requires validation.

from flask-wtf-decorators import FormValidator

form_validator = FormValidator()

@form_validator.validate_form(TestForm) @app.route(/, methods=[GET, 'POST']) def index(form): pass

You can tell Flask-WTF-Decorators what to do when a form is illegal. To do this you should provide a callback for error_handler.

@form_validator.error_handler def error_handler(errors): return jsonify({'errors': errors}), 400

Requires
rpmlib(PayloadFilesHavePrefix)  
rpmlib(PayloadIsZstd)  
rpmlib(PartialHardlinkSets)  
rpmlib(CompressedFileNames)  
rpmlib(FileDigests)  
Provides
python-flask-wtf-decorators
python3-flask-wtf-decorators
python3.10-flask-wtf-decorators
python3.10dist(flask-wtf-decorators)
python3dist(flask-wtf-decorators)

Document Actions