@register.simple_tag()<EOL>def render_layout_form(form, layout=None, **kwargs):
def make_component(type_, *args):<EOL><INDENT>"""<STR_LIT>"""<EOL>if type_ == "<STR_LIT>":<EOL><INDENT>return "<STR_LIT>".join(args)<EOL><DEDENT>elif type_ == "<STR_LIT>":<EOL><INDENT>result = "<STR_LIT>"<EOL>for c in args:<EOL><INDENT>if isinstance(c, tuple):<EOL><INDENT>result += make_component(*c)<EOL><DEDENT>elif isinstance(c, str):<EOL><INDENT>result += render_field(form.__getitem__(c), **kwargs)<EOL><DEDENT><DEDENT>return result<EOL><DEDENT>else:<EOL><INDENT>if len(args) < <NUM_LIT:2>:<EOL><INDENT>return "<STR_LIT>"<EOL><DEDENT>result = "<STR_LIT>".join([make_component(*c) for c in args])<EOL>if type_:<EOL><INDENT>return "<STR_LIT>" % (type_.lower(), result)<EOL><DEDENT>else:<EOL><INDENT>return result <EOL><DEDENT><DEDENT><DEDENT>return mark_safe("<STR_LIT>".join([make_component(*component) for component in layout]))<EOL>
Render an entire form with Semantic UI wrappers for each field with
    a layout provided in the template or in the form class

    Args:
            form (form): Django Form
            layout (tuple): layout design
            kwargs (dict): other attributes will be passed to fields

    Returns:
            string: HTML of Django Form fields with Semantic UI wrappers