~ubuntu-branches/ubuntu/maverick/twisted-web/maverick

« back to all changes in this revision

Viewing changes to doc/examples/rootscript.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2006-06-16 00:12:04 UTC
  • Revision ID: james.westby@ubuntu.com-20060616001204-e1m73r435qdxosrs
ImportĀ upstreamĀ versionĀ 0.6.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
from twisted.web import vhost, static, script
 
2
 
 
3
default = static.Data('text/html', '')
 
4
default.putChild('vhost', vhost.VHostMonsterResource())
 
5
resource = vhost.NameVirtualHost()
 
6
resource.default = default
 
7
file = static.File('static')
 
8
file.processors = {'.rpy': script.ResourceScript}
 
9
resource.addHost('twistedmatrix.com', file)