title: [GAE]How to set `inline` if in template
body: <p>Coming from PHP world, I used to create select box like this:</p>
  
  <pre><code>&lt;select&gt;
  &lt;?php foreach($arrField as $idx=&gt;$val){?&gt;
     &lt;option &lt;?php echo ($fieldVal == $idx ? "selected='selected'" : ''); ?&gt;&gt;&lt;?php echo $val; ?&gt;&lt;/option&gt;
  &lt;?php } ?&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>However, I can't do that in python. Here's my snippet:</p>
  
  <pre><code>&lt;select name='type'&gt;
     &lt;option value='normal' {% if id = 'normal' %} selected="selected"{% endif %}&gt;1-Normal&lt;/option&gt;
     &lt;option value='image' {% if id = 'image' %} selected="selected"{% endif %}&gt;2-Image&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>I got this error:</p>
  
  <pre><code>TemplateSyntaxError: 'if' statement improperly formatted
  </code></pre>
  
  <p>Is there a way to do this?</p>