title: Django template variable value to string literal comparison fails
body: <p>I have the following code in my template that supposed to compare the value of <code>watchinstance.shift</code>, which can be either "DAY" or "NIGHT", to a literal string "DAY". The comparisson always fails.</p>
  
  <pre><code>{% for watchinstance in watchinstance_list %}
      {% if watchinstance.shift == "DAY" %}
          &lt;p&gt;shift is DAY&lt;/p&gt;
      {% endif %}
  {% endfor %}
  </code></pre>
  
  <p>Using <code>ifequal</code> doesn't work either:</p>
  
  <pre><code>{% for watchinstance in watchinstance_list %}
      {% ifequal watchinstance.shift "DAY" %}
          &lt;p&gt;shift is DAY&lt;/p&gt;
      {% endifequal %}
  {% endfor %}
  </code></pre>
  
  <p>However, just calling <code>{{ watchinstance.shift }}</code> works as expected:</p>
  
  <pre><code>{% for watchinstance in watchinstance_list %}
      {{ watchinstance.shift }}
  {% endfor %}
  </code></pre>
  
  <p>returns DAYs and NIGHTs.</p>
  
  <p>I checked whether <code>watchinstance.shift</code> returns any extra characters, and it doesn't look like it does... What else can I be missing here?</p>