title: Django - Template with expression
body: <p>In a template I'd like evaluate this expression</p>
  
  <pre><code>assoc = service not in backends.not_associated
  </code></pre>
  
  <p>And store it in a variable, here is the context:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;ul class="list-inline"&gt;
  {% for service in backends.backends %}
      {% with assoc=service not in backends.not_associated %}
      &lt;li{% if assoc %} class="associated"{% endif %}&gt;
          &lt;a rel="nofollow"
              href="{% url
                  'social:'|add:assoc|yesno:'begin,disconnect' service %}"
              title="{{ service|title }}"&gt;
              &lt;img src="{% static 'social_icons/'|add:service|add:'.png' %}" /&gt;
          &lt;/a&gt;
      &lt;/li&gt;
      {% endwith %}
  {% endfor %}
  &lt;/ul&gt;
  </code></pre>
  
  <p>With am I getting this error ?</p>
  
  <blockquote>
    <p>u'with' received an invalid token: u'not'</p>
  </blockquote>
  
  <p>It seems <code>with</code> can't evaluate a boolean operation, can it ?</p>