1
from twisted.web.woven import model, page
3
# The AttributeModel sets submodels as attributes of itself.
4
# May not be secure theoretically, but we're using it for simple purposes here.
5
model = model.AttributeModel()
7
model.setSubmodel("greeting", "Hello, world!")
8
model.setSubmodel("anInt", 5465465)
9
model.setSubmodel("aList", ['fred', 'bob', 'alice', 'joe'])
10
model.setSubmodel("aDict", {'some': 'stuff', 'goes': 'here'})
12
resource = page.Page(model, templateFile="HelloWorld2.html")