Expand description
Descriptor-driven settings screens.
A module registers a SettingsItem for each settings model it wants an
operator to edit: its storage code (the laterite_settings::SettingsModel
CODE), a category it groups under, and the fields to render. The
framework mounts one index that lists every registered item grouped by
category, and one generic form per item that reads and writes the model’s
JSON value through laterite-settings. No per-model controller is needed,
exactly as a single settings controller serves every settings model.
Values are stored as one JSON object per code. Field names are JSON keys, not SQL identifiers, and the value is written through a parameterized upsert, so nothing here builds SQL from user input.
Structs§
- Settings
Field - One editable field of a settings model: the JSON key, its label, its widget, and optional help text shown beneath the control.
- Settings
Item - A settings model surfaced in the admin: a storage
code, acategoryandorderthat place it in the index, and the fields to edit.
Enums§
- Settings
Widget - How a settings field is rendered and typed in the stored JSON.