Template rendering
TemplateNotFound: blog-post.html#
Delivery loads templates from S3 via the active template pack. Check:
- Is the pack uploaded and marked as default for the site?
- Does the manifest reference the template's slug?
- Is the file path under
templates/and does it match the manifest'sfile:field?
"Variable X is undefined"#
In dev: enable Jinja StrictUndefined to make this loud (see the renderer
config). In prod: a {{ var | default('') }} filter sweeps over expected-
nullable fields.
"{{ content.fields.items }} shows <built-in method items of dict>"#
Python dicts have a method called items(). Use bracket notation:
jinja
1 | |
This bites everyone once.
"Blocks render as nothing"#
Each block's type must match a key under block_types in the pack's
manifest. Unknown types are silently skipped. Add the block type to the
manifest (with fields: declaring its data shape) and re-upload the pack.