34
37
raise NotImplementedError()
37
41
"""Abstract base class for XHTML overlays.
39
43
An overlay which provides a base class for overlays which need to return
40
44
XHTML. It is expected that apps which use this overlay will be written using
44
48
template = 'template.html'
47
51
"""Renders an XML stream from the template for this overlay."""
48
52
ctx = genshi.template.Context()
49
53
# This is where the sub-class is actually called
52
56
# Renders out the template.
53
57
template_path = os.path.join(os.path.dirname(
54
58
inspect.getmodule(self).__file__), self.template)
57
60
return tmpl.generate(ctx)
59
62
def populate(self, req, ctx):
60
63
raise NotImplementedError()