Default preset (id=-1)¶
Platform bootstrap still uses reserved registry rows where useful (global
site_settings at site_id=-1, and historically Template / Style
id=-1). Live site presentation is not chosen by writing
sites.template_id / sites.style_id — those columns were removed (AISD-226).
A site selects a curated template_styles pairing via
site_settings.template_style_id (see Styles and templates).
What “default” means now¶
| Concern | Current model |
|---|---|
| Global settings defaults | EAV rows at site_id=-1 (hq.cms.setting_keys) |
| Shell + CSS | templates / styles registries with s3_key + version |
| Site skin | template_style_id → template_styles → active_template + active_style |
| Static page HTML | *_html EAV keys (AISD-227), not template_blocks |
The public store returns 424 template_style_not_configured when the
resolved pairing is missing or inactive — there is no silent “pick any style”
fallback from a NULL sites.style_id.
Seed script note¶
scripts/seed_default_preset.py (AISD-158) originally cloned a base template
including TemplateBlock rows into id=-1. Those tables were dropped in
AISD-218. Treat that script as historical / needs a follow-up rewrite to seed
S3-backed registry rows and a default template_styles pairing only. Do not
document template_blocks cloning as a live operator path.
Website init¶
POST /admin/v1/websites stands up a site and should leave (or attach) a valid
template_style_id so /settings can resolve presentation. See
Website initialization.