The StaticStringDisplay class

M
ost of the pages under /info, just display one static string. In general if you want to create a page which just displays one static string, you should use the StaticStringDisplay class. Your python file will then look like

from utils.static_strings import StaticStringDisplay

class MyStaticStringDisplay(StaticStringDisplay): key = "WHICHKEY" tab = "WHICHTAB" title="NOTITLE"

def new(req): return MyStaticStringDisplay(req)

If you want your page to display more than one static string, then instead of defining the key you should also define the single_controls list to be the list of StaticStringControls. For e.g.,

from utils.static_strings import StaticStringDisplay

class MyStaticStringDisplay(StaticStringDisplay): tab = "SOME TAB" title="THIS TITLE" single_controls = [ StaticStringControl(key="key1"), StaticStringControl(key="key2") ... ]

def new(req): return MyStaticStringDisplay(req)

The StaticStringDisplay just defines single_controls in its make_page function (if necessary), sets the page to display shape and renders all the controls in single_controls.