Add New Column
{% csrf_token %}
{% for field in form %} {% comment %} field 'insert_position' must be the last field and has some special styling {% endcomment %} {% if field.name == 'insert_position' %} {% comment %} field 'values' are hidden until it is needed {% endcomment %} {% elif field.label == 'values' %}
{{field.label_tag}}
{{field}}
{{field.help_text}}
{% elif field.name not in table_fields and field.label not in odd_fields %}
{{field.label_tag}}
{{field|safe}}
{% elif dialect == 'postgresql' and field.label == 'type' %}
{{field.label_tag}}{{field}} {% elif field.name not in table_fields and field.label in odd_fields %}
{{field.label_tag}}
{{field}}
{% endif %} {% endfor %}
{% if dialect == 'mysql' %}
{{ form.insert_position.label }}
{{ form.insert_position}} {% endif %}