page_msg - give feedback

A plugin can response feedback to the users via the PyLucid page_msg function. The output can be simple colored and the functin is good for debugging.

The using is very easy. Here some example:

# Output in geen:
self.page_msg.green("Something was done, ok.")
# Output in red, for error messages:
self.page_msg.red("Something failed!")
# Without a color, the output is blue:
self.page_msg("These line is blue...")
# ...and we have a black color, too:
self.page_msg.black("...and this line is black.")

The output displayed via a simple django template "for loop". The output stored in the template context variable 'messages'. It's a simple list with every line of the output.
In the global template sould be exist something like this: