Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我可以编写一个可能带或不带单个参数的 Jinaj2 块标签吗?
例如,这两个调用都是有效的:
{% some_tag "one arg" %}
和
{% some_tag %}
我不明白你试图完成什么,但你可以使用默认值:
{% ....... |default('no_argument') %}