I am trying to set a variable in Jinja template. Just as simple as that. But I got error says : Invalid block tag: 'set', expected 'endblock'
Here is my template:
{% block content %}
<div class="col-lg-7 col-lg-offset-2">
<div style="padding-top:100px"></div>
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">
<i class="mdi-social-person"></i>
Reports
</h3>
</div>
<div class="panel-body">
{% set index = 'a' %}
</div>
</div>
</div>
{% endblock content %}
I thought set should be straight forward not this difficult.
set
is jinja's tag, but jinja is not Django's default templating engine as @Jharris and @Gocht mentioned in the comment. So, I need to install jinja first to use set
tag.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With