'Update the storage backend (i.e., save the messages).
If not all messages could not be stored and ``DEBUG`` is ``True``,
raise ValueError.'

def process_response(self, request, response):

    if hasattr(request, '_messages'):
        unstored_messages = request._messages.update(response)
        if (unstored_messages and settings.DEBUG):
            raise ValueError('Not    all    temporary    messages    could    be    stored.')
    return response
