{% macro input(fieldname, field, value='') -%}
{% if value == None %} {% set value = '' %} {% endif %} {% if field.base_type == 'bool' %} {% elif field.base_type == 'password' %} {% elif field.base_type == 'char' or field.base_type == 'int' %} {% elif field.base_type == 'ref' %} {% if value is iterable %} {% set sval=value|join(',') %} {% else %} {% set sval = value %} {% endif %} {% if field.directly_editable %} {% set l_classe = field.allowed_classes %}

Please enter uids to instances of {{ l_classe.__name__ }} separated by commas

{% else %}

If you want to update this field, please do it in child objects

{% endif %} {% else %} Unsupported base type "{{field.base_type}}"
{% endif %}
{%- endmacro %}