{% extends 'base.html' %}

{% from 'bootstrap/form.html' import render_form, render_field, render_form_row %}

{% block content %}

    <h1>render_form</h1>
    {{ render_form(form) }}

    <h1>render_field</h1>
    <form method="post">
    {{ form.csrf_token }}
    {{ render_field(form.username) }}
    {{ render_field(form.password) }}
    {{ render_field(form.remember) }}
    {{ render_field(form.submit) }}
    </form>

    <h1>render_form_row</h1>
    <form method="post">
    {{ form.csrf_token }}
    {{ render_form_row([form.username, form.password]) }}
    {{ render_form_row([form.username, form.password], col_map={'username': 'col-md-6', 'password': 'col-md-4'}) }}
    {{ render_form_row([form.username, form.password], col_map={'username': 'col-md-2', 'password': 'col-md-8'}) }}
    {{ render_form_row([form.username, form.password], col_class_default='col-md-2') }}
    {{ render_form_row([form.remember]) }}
    {{ render_form_row([form.submit]) }}
    </form>
    
{% endblock %}
