~certify-web-dev/twisted/certify-trunk

« back to all changes in this revision

Viewing changes to doc/howto/listings/HelloWorld/HelloWorld2.rpy

  • Committer: Bazaar Package Importer
  • Author(s): Free Ekanayaka
  • Date: 2010-03-09 13:32:00 UTC
  • mfrom: (2.2.6 sid)
  • Revision ID: james.westby@ubuntu.com-20100309133200-xs2rrzwnn9k86sbx
Tags: 10.0.0-2
* Include changes from 9.0.0-2 which got skipped
* python-twisted depends on version >= 10.0 of other packages

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
from twisted.web.woven import model, page
2
 
 
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()
6
 
 
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'})
11
 
 
12
 
resource = page.Page(model, templateFile="HelloWorld2.html")