{% macro render_field(field, label=None, label_visible=true, right_url=None, right_label=None) -%}
<div class="form-group {% if field.errors %}has-error{% endif %} {{ kwargs.pop('class_', '') }}">
    {{ field(class_='form-control', **kwargs) }}
    {% if field.errors %}
    {% for e in field.errors %}
    <p class="help-block">{{ e }}</p>
    {% endfor %}
    {% endif %}
</div>
{%- endmacro %}

{% macro render_tag(tag) -%}
    <span class="label label-tag" style="color: {{ color }}; background-color: {{ tag.color }};">{{ tag.name }}</span>
{%- endmacro %}
