[Django]-Disable a button if the two values coming from my views.py are equal

3👍

You dont need {{''}} around disabled attribute. Just try this:

<button {% if value1 == value2 %} disabled {% endif %} type="button">Add</button>

Leave a comment