How to add Conditional CSS class based on Python If statement : <p>How do you add a conditional CSS class based on a Python if statement in the following example to show the <code>has-success has-feedback</code> form element?</p>

<pre><code>&lt;div class="form-group {% if not error_username %} has-success has-feedback {% endif %}"&gt;
</code></pre>
