def add_session_msg(request, message, level):
    """
    Adds a message to our session var which will get shown on
    the next page view.  Only 'success' and 'fail' are valid
    for ``level``, but values other than that will be silently
    ignored.
    """
    if level != 'success' and level != 'fail':
        return
    varname = 'exordium_msg_%s' % level
    if varname not in request.session:
        request.session[varname] = []
    request.session[varname].append(message)
    request.session.modified = True
