CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-flask-wtf

Form rendering, validation, and CSRF protection for Flask with WTForms.

72

0.91x
Overview
Eval results
Files

rubric.jsonevals/scenario-6/

{
  "context": "This criteria evaluates how well the engineer uses Flask-WTF's FlaskForm class to handle smart data source detection, automatically binding form data and file uploads from the request. The focus is on proper usage of FlaskForm's automatic request data binding, form validation methods, and file upload validators.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "FlaskForm usage",
      "description": "Uses FlaskForm class (from flask_wtf import FlaskForm) to define the registration form instead of plain WTForms Form class",
      "max_score": 20
    },
    {
      "name": "Automatic data binding",
      "description": "Leverages FlaskForm's automatic request data binding by instantiating the form without explicitly passing formdata parameter, allowing Flask-WTF to automatically populate from request.form and request.files",
      "max_score": 25
    },
    {
      "name": "FileField usage",
      "description": "Uses FileField or MultipleFileField from flask_wtf.file module for the avatar upload field",
      "max_score": 15
    },
    {
      "name": "FileAllowed validator",
      "description": "Uses FileAllowed validator from flask_wtf.file to validate allowed file extensions for the avatar field",
      "max_score": 15
    },
    {
      "name": "Form validation methods",
      "description": "Uses FlaskForm's validate_on_submit() or validate() method to check form validity, which properly handles the combined form and file data",
      "max_score": 15
    },
    {
      "name": "Form field definitions",
      "description": "Properly defines form fields using WTForms field types (StringField, PasswordField, TextAreaField, etc.) with appropriate validators (DataRequired, Email, etc.) for username, email, password, and bio",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/pypi-flask-wtf

tile.json