WSGI middleware for handling status messages in cookies
Imagine you want to show some message like “blog has been added” to the user after he hit “submit” on the addform. You most likely want to do a redirect on a successful addition so that the user cannot accidently hit “reload” and submit the data again.
In order to do that this middleware offers you a possibility of storing one or more messages in a cookie. Therefor it provides a MessageList object in the WSGI environment under the key qc.statusmessage. Check out the qc.statusmessage.message.MessageList API for more information on how to use it but basically it’s a simple list object and all methods usually available to lists apply.
The contents of the MessageList object are serialized to a cookie on egress and deserialized again on ingress. You can name the cookie in the constructor of this middleware.