def set_message_to(response, msg):
    # We just keep the message two seconds.
    max_age = 2
    expires_time = time.time() + max_age
    expires = cookie_date(expires_time)
    if msg:
        response.set_cookie("message", lfs_quote(msg), max_age=max_age, expires=expires)
    return response
Sets message cookie with passed message to passed response.
dataset/ETHPy150Open diefenbach/django-lfs/lfs/core/utils.py/set_message_to