如果满足条件,我想定义一个变量:
{% if order_item.status.ordering >= 60 and is_client %}
{% with readonly=1 %}
{% else %}
{% with readonly=0 %}
{% endif %}
...some code
{% endwith %}
但是,我收到以下错误:
Invalid block tag: 'else', expected 'endwith'
如何在 django 中修复此错误?