See also:
Basics
...
HTML Widgets
To make the code, especially that of actions, easier to read and maintain, the generation of pages should be based on HTML widgets:
MoinMoin.widget.htmlpage.Document - a HTML page, including HTTP headers
MoinMoin.widget.htmlpage.Head - header
MoinMoin.widget.htmlpage.Body - body
This also eases the setting of special headers, while keeping the ability to stream pages (or recognizing the error condition that code sets headers after we flushed them already).