{% load i18n static %}
<div style="padding: 10px;min-height: 300px;min-width: 400px;">
    <form class="layui-form action-form" action="" method="post" id="{{model_name}}_{{action_repr}}">
        {% csrf_token %}
        {% if form %}
            <div>
                {% for fieldset in form %}
                  {% include "includes/fieldset.html" %}
                {% endfor %}
            </div>
        {% endif %}

    </form>
</div>
<script>
    layui.use(['form', 'element', 'laydate'], function() {
        var form = layui.form, element=layui.element, laydate = layui.laydate;
        //element.render();
        $("form.layui-form input.layui-datetime").each(function(){
            laydate.render({elem: this, type: 'datetime'});
        });
        $("form.layui-form input.layui-date").each(function(){
            laydate.render({elem: this, type: 'date'});
        });
        $("form.layui-form input.layui-time").each(function(){
            laydate.render({elem: this, type: 'time'});
        });
        {% block form_verify %}
            form.verify({ });
        {% endblock %}
    });
</script>
