title: Iterate through model fields in jinja template
body: <p>I have several models in my application, and as I will have some views doing the same thing (form + tables showing existing records in my model), but implemented dfferently because of the model, which will be different in each case, I was wondering if it was possible to make it generic.</p>
  
  <p>I googled a bit and was not able to find anything relevant to my case.
  What I would like to achieve:</p>
  
  <p>In my view, I want to go through each object from the model that I passed to the template, for example:</p>
  
  <pre><code>return render_template('addstatus.html', form=form, statuses=Status.query.all(), 
          target_model="Status", fields=Status.__mapper__.c.keys())
  </code></pre>
  
  <p>But I want to have only one view, whatever the model will be, so I am not able to know in advance the fields of my model, the number of columns and so on.</p>
  
  <p>I want to have something like that in my view:</p>
  
  <pre><code>{% for obj in objects %}
     {% for field in obj.fields %} (not existing)
        &lt;h1&gt; {{ field }} :: {{ obj.fields.field.value }}
     {% endfor %}
  {% endfor %}
  </code></pre>
  
  <p>Is it something possible? How can I achieve that?</p>