@contextfunction
def flash_messages(context):
    app_context = context['context']
    if 'flash_messages' not in app_context:
        if 'request' in app_context and app_context['request'].session:
            app_context['flash_messages'] = controllers.FlashMessagesContainer(
                app_context['request'].session)
        else:
            app_context['flash_messages'] = {}
    return context['context']['flash_messages']
Retrieves the flash messages from the controller.
dataset/ETHPy150Open watsonpy/watson-framework/watson/framework/support/jinja2/globals.py/flash_messages