

def get_flash():
    'Reads and deletes a flash message. Flash messages are stored in a cookie\n  and automatically deleted when read.\n\n  :return:\n      The data stored in a flash, if any.\n  '
    key = settings.FLASH_COOKIE_NAME
    data = getattr(local, 'flash_message', None)
    if (data is None):
        if (key in local.request.cookies):
            data = local.request.cookies[key]
    local.flash_message = None
    if data:
        return pickle.loads(b64decode(data))
    return ''

dataset/ETHPy150Open IanLewis/kay/kay/utils/flash.py get_flash/original