def flatatt(attrs):
    key_value_attrs = []
    boolean_attrs = []
    for attr, value in attrs.items():
        if isinstance(value, bool):
            if value:
                boolean_attrs.append((attr,))
        else:
            key_value_attrs.append((attr, value))

    return (
        format_html_join('', ' {}="{}"', sorted(key_value_attrs)) +
        format_html_join('', ' {}', sorted(boolean_attrs))
    )
Represent an Incident Report via it's name
dataset/ETHPy150Open django/django/django/forms/utils.py/flatatt--crossover with--dataset/ETHPy150Open sahana/eden/modules/s3db/irs.py/S3IRSModel.irs_ireport_represent