def set_level(request, level):
 if (not hasattr(request, '_messages')):
  return False
 request._messages.level = level
 return True

def set_level ( request , level ) : if ( not hasattr ( request , '_messages' ) ) : return False request . _messages . level = level return True
sets the minimum level of messages to be recorded .