Django Messages - message levels


Django tip:

There are five message levels in Django's message framework that correspond to the same tags from Python's logging module (in lowercase):

  1. DEBUG
  2. INFO
  3. SUCCESS
  4. WARNING
  5. ERROR
messages.debug(request, "I'm debugging.")
messages.info(request, "I'm informing.")
messages.success(request, "You were successful.")
messages.warning(request, "This is a warning.")
messages.error(request, "This is an error.")

You can set a minimum message level that will be recorded (default is INFO).