- Timestamp:
- 01/19/07 12:21:47 (2 years ago)
- Files:
-
- branches/convenient-adding/examples.tac (modified) (1 diff)
- branches/convenient-adding/formal/examples/main.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/convenient-adding/examples.tac
r196 r276 4 4 5 5 application = service.Application('examples') 6 service = internet.TCPServer(8000, main.makeSite( application))6 service = internet.TCPServer(8000, main.makeSite()) 7 7 service.setServiceParent(application) 8 8 branches/convenient-adding/formal/examples/main.py
r275 r276 28 28 ] 29 29 30 def makeSite( application):30 def makeSite(): 31 31 root = RootPage() 32 site = appserver.NevowSite(root, logPath= 'web.log')32 site = appserver.NevowSite(root, logPath="web.log") 33 33 return site 34 34 … … 111 111 setattr(RootPage, 'child_formal.css', formal.defaultCSS) 112 112 setattr(RootPage, 'child_js', formal.formsJS) 113 114 if __name__ == '__main__': 115 116 import sys 117 from twisted.internet import reactor 118 from twisted.python import log 119 120 if len(sys.argv) > 1: 121 port = int(sys.argv[1]) 122 else: 123 port = 8000 124 125 log.startLogging(sys.stdout) 126 site = makeSite() 127 reactor.listenTCP(port, site) 128 reactor.run() 129
