How can I update a javascript variable and use it in a if statement?
<button onclick="hire = true">
Hire
</button>
{% if hire %} //does not work
<!-- print something -->
{% endif %}
<script>
let hire = false;
</script>
I tried to declare the variable in views.py but then I can't update it in the template