Where do I use StaticString class?

T
ypically the StaticString class is used in this form as a display mixin, and the GetString method is called in the make_page function of the display class. This is useful if your page does not need to do anything but just display the contents of a static string. For e.g,

class MyDisplay(Display, StaticString):

def make_page(self,page): ... stuf ... page.append(self.GetString(key="mykey", display=self, title_fn=page.set_title))

One draw back of this method, is that one cannot use this in a page which has some computed stuff (i.e. a database display) also, especially if this string has to come, say once after every row of display.

Use of the StaticString class as a Mixin is discouraged. However there may be situations where this can't be avoided. See the account_request.py for an example.