Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

chore(ci): seed dashboard templates without the demo generators (#104849)

Raúl Negrón-Otero0fe5e8912e7c
diff --git a/posthog/management/commands/ensure_migration_defaults.py b/posthog/management/commands/ensure_migration_defaults.py
index 0e2c9055ff91..62dc595b977d 100644
--- a/posthog/management/commands/ensure_migration_defaults.py
+++ b/posthog/management/commands/ensure_migration_defaults.py
@@ -15,7 +15,7 @@ from posthog.models.data_color_theme import DataColorTheme
from posthog.models.oauth import OAuthApplication
from products.dashboards.backend.models.dashboard_templates import DashboardTemplate
-from products.demo.backend.facade.api import seed_dev_dashboard_templates
+from products.demo.backend.facade.dashboard_templates import seed_dev_dashboard_templates
from products.growth.backend.models import EnrichmentPromptConfig
# auth groups originally seeded by RunPython migrations. Keep this in sync with
diff --git a/products/demo/backend/facade/dashboard_templates.py b/products/demo/backend/facade/dashboard_templates.py
new file mode 100644
index 000000000000..047b6ab94612
--- /dev/null
+++ b/products/demo/backend/facade/dashboard_templates.py
@@ -0,0 +1,9 @@
+"""Dashboard template seeding for core.
+
+A module apart from ``api.py``, which imports every demo data generator. The schema restore
+of each test shard seeds these templates and does not need the generators.
+"""
+
+from products.demo.backend.logic.dashboard_template_seeds import seed_dev_dashboard_templates
+
+__all__ = ["seed_dev_dashboard_templates"]