<form method="POST"
  accept-charset="utf-8"
  enctype="multipart/form-data"
  {% if sa_crud %}
  {% if not sa_crud['obj'] %}
  action="{{ request.route_url('sa_create', table=sa_crud['table'].__tablename__) }}">
  {% else %}
  action="{{ request.route_url('sa_update', table=sa_crud['table'].__tablename__,
  id=getattr(sa_crud['obj'], sa_crud['pk'])) }}">
  {% endif %}
  {% endif %}
  <div class="sa_table">
    <table id="index">
      <tr>
        <th>Column</th>
        <th>Value</th>
      </tr>
      {% if sa_crud %}
      {% set obj=sa_crud['obj'] %}
      {% for col in sa_crud['col'] %}
      {% if not col.name==sa_crud['pk'] %}
      <tr>
        <td>
          {{ col.name }}
        </td>
        <td>
          {% set is_fk = [] %}
          {% for exp in rel %}
          {% if exp['col'].name == col.name %}
          {% set cls=exp['cls'] %}
          {% do is_fk.append(1) %}
          {% include "sacrud/types/ForeignKey.jinja2" %}
          {% endif %}
          {% endfor %}
          {% if not is_fk %}
          {% include "sacrud/types/"+str(col.type.__class__.__name__)+".jinja2" %}
          {% endif %}
        </td>
      </tr>
      {% endif %}
      {% endfor %}
      {% endif %}
    </table>
  </div>
  <input type="submit" id="button_save" name="form.submitted" value="Save" />
</form>
