fix: correct template_dir config key, add example export templates#1282
Merged
Conversation
yeti.conf.sample defined `templates_dir`, but core/schemas/template.py and
core/web/apiv2/templates.py both read `template_dir` (singular), so a
custom directory set via the sample config's key was silently ignored.
Adds extras/templates/{json,csv}_export.jinja2 as annotated starting
points for issue #1256 (no doc or example export templates exist). The
matching write-up for the `data` context variable is tracked separately
in yeti-platform/yeti-platform.github.io.
2 tasks
tomchop
approved these changes
Jul 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses #1256 ("No doc for or example export templates exist"):
yeti.conf.sampledefinedtemplates_dir, but the code(
core/schemas/template.py,core/web/apiv2/templates.py) readstemplate_dir(singular) viayeti_config.get("system", "template_dir", ...).A user setting
templates_dirper the sample config had it silentlyignored, always falling back to the default
/opt/yeti/templates.Renamed the key and added a comment on the required api/tasks volume
sharing.
extras/templates/json_export.jinja2andextras/templates/csv_export.jinja2as annotated starting points,documenting the only context variable available to export templates
(
data, a list ofObservableobjects) and its common fields.datacontext and getting-started guide for thedocs site is tracked separately against yeti-platform.github.io.
Test plan
Observablewith tags; output validated as well-formed JSON/CSV.