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