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%

task.mdevals/scenario-3/

Analytics Dashboard View

Build a custom analytics dashboard for an admin interface that displays statistics and charts. The dashboard should have multiple pages accessible through different routes.

Requirements

Create a custom admin view that provides analytics functionality with the following pages:

  1. Overview Page (default/index route):

    • Display a welcome message: "Analytics Dashboard"
    • Show current timestamp
    • Render using a template
  2. Statistics Page (route: /stats):

    • Display mock statistics (e.g., total users: 150, active sessions: 23, page views: 1240)
    • Render these statistics in a template
  3. Reports Page (route: /reports):

    • Show a list of available reports with names: "Monthly Report", "Quarterly Report", "Annual Report"
    • Each report should display a generated date
    • Render using a template

Technical Specifications

  • The view should be registered with the admin interface at the URL path /analytics
  • The view's menu name should be "Analytics"
  • Each page must be accessible via its own route
  • Use template rendering to display the content for each page
  • Pass all necessary data to templates as context variables
  • Templates should be simple HTML files (you can create them inline or as separate files)

Implementation

@generates

API

class AnalyticsView:
    """Custom admin view for analytics dashboard."""

    def index(self):
        """Overview page showing dashboard welcome and timestamp."""
        pass

    def stats(self):
        """Statistics page displaying mock analytics data."""
        pass

    def reports(self):
        """Reports page listing available reports."""
        pass

Test Cases

  • The analytics view can be registered with an admin instance and accessed at /admin/analytics @test
  • The overview page is accessible and returns a 200 status code @test
  • The statistics page is accessible at /admin/analytics/stats and displays correct data @test
  • The reports page is accessible at /admin/analytics/reports and lists all three reports @test

Dependencies { .dependencies }

flask-admin { .dependency }

Provides the admin interface framework and view system with routing capabilities.