📜  jinja 模板表 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:14.054000             🧑  作者: Mango

代码示例3
items = []
for i in range(1, 11):
    i = str(i)

    # dict == {}
    # you just don't have to quote the keys
    an_item = dict(date="2012-02-" + i, id=i, position="here", status="waiting")
    items.append(an_item)

# ... your code here ...

template.render(items=items)