Changeset 1656
- Timestamp:
- 05/23/07 12:42:49
- Files:
-
- trunk/cherrypy/__init__.py (modified) (1 diff)
- trunk/cherrypy/_cpdispatch.py (modified) (1 diff)
- trunk/cherrypy/_cptree.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/__init__.py
r1639 r1656 206 206 207 207 def quickstart(root, script_name="", config=None): 208 """Mount the given root, start the builtin server (and engine), then block.""" 208 """Mount the given root, start the builtin server (and engine), then block. 209 210 root: an instance of a "controller class" (a collection of page handler 211 methods) which represents the root of the application. 212 script_name: a string containing the "mount point" of the application. 213 This should start with a slash, and be the path portion of the URL 214 at which to mount the given root. For example, if root.index() will 215 handle requests to "http://host.domain.tld:8080/dept/app1/", then 216 the script_name argument would be "/dept/app1". 217 config: a file or dict containing application config. If this contains 218 a [global] section, those entries will be used in the global 219 (site-wide) config. 220 """ 209 221 if config: 210 222 _global_conf_alias.update(config) trunk/cherrypy/_cpdispatch.py
r1655 r1656 355 355 http://www.mydom2.com:443 -> root/secure 356 356 357 can be accomplished via: 358 357 can be accomplished via the following config: 358 359 [/] 359 360 request.dispatch = cherrypy.dispatch.VirtualHost( 360 361 **{'www.mydom2.com': '/mydom2', trunk/cherrypy/_cptree.py
r1627 r1656 129 129 130 130 def mount(self, root, script_name="", config=None): 131 """Mount a new app from a root object, script_name, and config.""" 131 """Mount a new app from a root object, script_name, and config. 132 133 root: an instance of a "controller class" (a collection of page 134 handler methods) which represents the root of the application. 135 script_name: a string containing the "mount point" of the application. 136 This should start with a slash, and be the path portion of the 137 URL at which to mount the given root. For example, if root.index() 138 will handle requests to "http://host.domain.tld:8080/dept/app1/", 139 then the script_name argument would be "/dept/app1". 140 config: a file or dict containing application config. 141 """ 132 142 # Next line both 1) strips trailing slash and 2) maps "/" -> "". 133 143 script_name = script_name.rstrip("/")

