In Jinja2 templating engine (using Flask), I want to achieve something like that:
{% reusable_block avatar(user) %}
You can use macros.
{% macro input(name, value='', type='text', size=20) -%} {%- endmacro %} {{ input('username') }} {{ input('password', type='password') }}
{{ input('username') }}
{{ input('password', type='password') }}
More documentation here.