def add_message(request, level, message, extra_tags='', fail_silently=False):
    if not horizon_message_already_queued(request, message):
        if request.is_ajax():
            tag = constants.DEFAULT_TAGS[level]
            # if message is marked as safe, pass "safe" tag as extra_tags so
            # that client can skip HTML escape for the message when rendering
            if isinstance(message, SafeData):
                extra_tags = extra_tags + ' safe'
            request.horizon['async_messages'].append([tag,
                                                      force_text(message),
                                                      extra_tags])
        else:
            return _messages.add_message(request, level, message,
                                         extra_tags, fail_silently)
Legend styling properties
dataset/ETHPy150Open CiscoSystems/avos/horizon/messages.py/add_message--crossover with--dataset/ETHPy150Open wrobstory/vincent/vincent/legends.py/LegendProperties.legend