📜  jinja 宏导入 - Python 代码示例

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

代码示例1
# This is how you define the macro
# This is in the file "Input_Block"
{% macro input(name, value='', type='text', size=20) -%}
    
{%- endmacro %}

# Import from the file and set a contextual name
{% import 'Input_Block' as emailBlock %}
{{ emailBlock.input("user input") }}