Premium
Dashboard
Mark a resource as available for a dashboard by setting dashboard_enabled = True.
The flag is optional and defaults to False, so existing admins keep their current
behaviour (backward compatible):
from habarico import ModelAdmin
from .models import Product
class ProductAdmin(ModelAdmin):
model = Product
dashboard_enabled = True # This resource can be used for a dashboard
dashboard_enabled is reflected in the service schema returned by /admin/schema/
(as the dashboard_enabled boolean), so the frontend can decide whether to offer the resource as
a dashboard source. Admins without the opt-in emit dashboard_enabled: false. The field is
described in the repo-root contract/openapi.yaml under the GlobalResourceSchema component.
caution
dashboard_enabled gates every widget type. A resource that sets aggregate_enabled = True but
leaves dashboard_enabled at False still backs no chart — the frontend filters on both flags.
See also
- Aggregations — the endpoint the chart widgets read
- Dashboard — the widgets on the frontend side
- Data sources — how the two flags select a widget type