Is django can modify variable value in template?
This can be done with a Django custom filter
django custom filter
def update_variable(value):
data = value
return data
register.filter('update_variable', update_variable)
{% with "true" as data %}
{% if data == "true" %}
//do somethings
{{update_variable|value_that_you_want}}
{% else %}
//do somethings
{% endif %}
{% endwith %}