tessl install tessl/pypi-flask-wtf@1.2.0Form rendering, validation, and CSRF protection for Flask with WTForms.
Agent Success
Agent success rate when using this tile
72%
Improvement
Agent success rate improvement when using this tile compared to baseline
0.91x
Baseline
Agent success rate without this tile
79%
Build a simple web application that displays a contact form with internationalization support for English and Spanish. The form should validate user input and display error messages in the user's preferred language.
Create a Flask application with the following features:
Language Selection: Support two languages - English (en) and Spanish (es). The application should detect the language from a query parameter lang (e.g., /contact?lang=es), defaulting to English if not specified.
Contact Form: Create a form with the following fields:
Validation Messages: When the form fails validation, error messages should be displayed in the appropriate language:
Form Rendering: Create a template that displays the form and shows validation errors when present.
/contact that handles both GET (display form) and POST (process submission) requests?lang=es displays validation error messages in Spanish @test@generates
Provides form handling and CSRF protection for Flask applications.
Provides internationalization and localization support for Flask applications.