Alon Swartz - Mon, 2011/03/21 - 09:35 -
First, a little background
Django has an excellent messages framework which provides support for cookie and session-based messaging, for both anonymous and authenticated users.
The messages framework allows you to temporarily store messages in one request, and retrieve them for display in a subsequent request (usually the next one). Every message is tagged with a specific level determining its priority (e.g. success, info, error).
For example, in a view you can send a message: