Simple and extensible admin interface framework for Flask
86
Quality
Pending
Does it follow best practices?
Impact
86%
1.30xAverage score across 10 eval scenarios
A Flask-Admin application for managing product reviews in an e-commerce platform with large datasets.
You're building an admin interface for a product review system. The database contains thousands of products and tens of thousands of reviews. When creating or editing a review through the admin interface, selecting a product from a standard dropdown becomes impractical due to the large number of products.
Build a Flask-Admin interface that efficiently handles review management with the following specifications:
Create two SQLAlchemy models:
Product: Represents products in the system
id: Integer primary keyname: String (200 characters max)sku: String (50 characters max), unique identifiercategory: String (100 characters max)Review: Represents customer reviews
id: Integer primary keyproduct_id: Foreign key to Productrating: Integer (1-5)comment: Text fieldreviewer_name: String (100 characters max)created_at: DateTime with default to current timeCreate a Flask application with Flask-Admin that:
Provides a ModelView for managing reviews
Implements efficient product selection in review forms that:
Allows all standard CRUD operations on reviews
Uses SQLite database for storage
@generates
"""
Flask-Admin application for product review management with AJAX foreign key loading.
"""
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_admin import Admin
from flask_admin.contrib.sqla import ModelView
from datetime import datetime
# Database models and admin views should be implemented here
# The application should be runnable and provide the admin interfaceProvides admin interface framework with AJAX foreign key loading capabilities.
Provides SQLAlchemy integration for Flask.
Install with Tessl CLI
npx tessl i tessl/pypi-flask-admindocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10