Utility functions to return a formatted name and description for a given view.

Module Contents

remove_trailing_string(content, trailing)

Strip trailing component trailing from content if it exists. Used when generating names from view classes.


Remove leading indent from a block of text. Used when generating descriptions from docstrings.

Note that python’s textwrap.dedent doesn’t quite cut it, as it fails to dedent multiline docstrings that include unindented text on the initial line.


Translate ‘CamelCaseNames’ to ‘Camel Case Names’. Used when generating names from view classes.


Apply HTML markup to the given description.