title: flask db query.all read one column of data
body: <p>I need to query my db and reassign one of the columns value to another value and pass the new value to the template for rendering. Should I be trying to accomplish this in flask or templating? And how can I accomplish this?</p>
  
  <p>i have db model as:</p>
  
  <pre><code>class Items(db.Model):
      id = db.Column(db.Integer, primary_key=True)
      item_name = db.Column(db.String(60), unique=True, nullable=False)
      item_type = db.Column(db.String(1), nullable=False)
  </code></pre>
  
  <p>i have flask function as:</p>
  
  <pre><code>@auth.route('/items', methods=['GET', 'POST'])
  @login_required
  def list_items():
      items = Items.query.all()
      if items.item_type == "s":
        items.item_type = "Sod"
      return render_template('auth/item_list.html', items=items, title='Items')
  </code></pre>
  
  <p>i have template as:</p>
  
  <pre><code>&lt;tbody&gt;
  {% for item in items %}                    
  &lt;tr&gt;
   &lt;td&gt; {{ items.item_name }} &lt;/td&gt;
   &lt;td&gt; {{ items.item_type }} &lt;/td&gt;
  &lt;/tr&gt;
  {% endfor %}
  &lt;/tbody&gt;         
  </code></pre>