Ctrl + k

or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/flask-admin@1.6.x
tile.json

tessl/pypi-flask-admin

tessl install tessl/pypi-flask-admin@1.6.0

Simple and extensible admin interface framework for Flask

Agent Success

Agent success rate when using this tile

86%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.3x

Baseline

Agent success rate without this tile

66%

rubric.jsonevals/scenario-7/

{
  "context": "This criteria evaluates how well the engineer uses Flask-Admin's file and image upload capabilities to implement a product catalog with image management. The focus is on proper usage of ImageUploadField with thumbnail generation, file validation, and cleanup operations.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "ImageUploadField usage",
      "description": "Uses ImageUploadField class from flask_admin.form.upload for the Product image field, configured with base_path for storage location and relative_path for URL generation.",
      "max_score": 25
    },
    {
      "name": "File type validation",
      "description": "Configures allowed_extensions parameter on ImageUploadField to restrict uploads to image formats (e.g., ['jpg', 'jpeg', 'png', 'gif']) for security and validation.",
      "max_score": 15
    },
    {
      "name": "Thumbnail generation",
      "description": "Configures thumbnail_size parameter on ImageUploadField to generate thumbnails (e.g., (150, 150, True)) with proper dimensions and aspect ratio maintenance.",
      "max_score": 20
    },
    {
      "name": "Secure filename handling",
      "description": "Uses namegen parameter or relies on default secure filename generation to prevent directory traversal and ensure safe file naming.",
      "max_score": 10
    },
    {
      "name": "Form field integration",
      "description": "Properly overrides form_extra_fields or form_overrides in the ProductAdmin ModelView to integrate the ImageUploadField with the Product model's image attribute.",
      "max_score": 15
    },
    {
      "name": "Column formatter for thumbnails",
      "description": "Uses column_formatters with proper image display logic (e.g., using Markup and _list_thumbnail method) to show thumbnail previews in the admin list view.",
      "max_score": 10
    },
    {
      "name": "File cleanup",
      "description": "Implements proper file deletion by either using ImageUploadField's built-in cleanup or implementing on_model_delete hook to remove image and thumbnail files when a product is deleted.",
      "max_score": 5
    }
  ]
}