safe.messaging.item.abstract_list module

InaSAFE Disaster risk assessment tool developed by AusAid - Abstract List

Contact : ole.moller.nielsen@gmail.com

Note

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

class safe.messaging.item.abstract_list.AbstractList(*args, **kwargs)[source]

Bases: safe.messaging.item.message_element.MessageElement

A class to model free text in the messaging system

add(item)[source]

add a Text MessageElement to the existing Text

Strings can be passed and are automatically converted in to item.Text()

Args:
Text text, an element to add to the text
Returns:
None
Raises:
Errors are propagated
to_html()[source]

Render a Text MessageElement as html

Args:
None
Returns:
Str the html representation of the Text MessageElement
Raises:
Errors are propagated
to_text()[source]

Render a Text MessageElement as plain text

Args:
None
Returns:
Str the plain text representation of the Text MessageElement
Raises:
Errors are propagated