3
from twisted.web.woven.controller import Controller
4
from twisted.web.woven.model import MethodModel
5
from twisted.web.woven.view import View
6
from twisted.web.woven.widgets import ExpandMacro
8
class SimpleView(View):
9
def wvfactory_macro(self, request, node, model):
12
macroFile="macros.html",
13
macroFileDirectory=self.templateDirectory,
17
class NothingModel(MethodModel):
20
class MacroDemo(Controller):
22
templateDirectory = "."
23
viewFactory = SimpleView
25
def wchild_index(self, req):
26
return self.makeView(NothingModel(), "page1.html")
28
def wchild_page2(self, req):
29
return self.makeView(NothingModel(), "page2.html")