What jinja2 template features are available in Aggregation Formats?

时间:2018-03-23 00:23:46

标签: getstream-io

The documentation says aggregation rules use Jinja2 template syntax (https://getstream.io/docs/#aggregated-feeds), however many Jinja2 features don't seem to be supported and return syntax errors when trying to preview on the getstream.io aggregated feed group config screen.

For example, {{ actor|replace(":", "|") }} and {{ actor|length }} return syntax errors, but {{ actor|lower }} and {{ actor|int }} seem to work fine.

Does anyone know what subset of Jinja2 features are actually supported?

1 个答案:

答案 0 :(得分:1)

您只能使用一组非常有限的过滤器。例如,时间对象上的intlowerstrftime。在其旁边,您可以使用ifelseendif控制结构。

我们正在制作一份完整的清单,并在此处记录:https://getstream.io/docs/#aggregated-feeds并相应更新此SO答案。

我们希望现在满足您的需求。