'Stores a list of messages to the request\'s session.'

def _store(self, messages, response, *args, **kwargs):

    if messages:
        self.request.session[self.session_key] = self.serialize_messages(messages)
    else:
        self.request.session.pop(self.session_key, None)
    return []
