Changeset 936
- Timestamp:
- 01/25/06 01:54:45
- Files:
-
- trunk/cherrypy/_cptree.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/_cptree.py
r923 r936 19 19 self.mount_points = {} 20 20 21 def mount(self, app_root, baseurl= "/", conf=None):21 def mount(self, app_root, baseurl=None, conf=None): 22 22 """Mount the given app_root at the given baseurl (relative to root).""" 23 23 import cherrypy 24 25 if conf and not isinstance(conf, dict): 26 conf = cherrypy.config.dict_from_config_file(conf) 27 28 if baseurl is None: 29 baseurl = "/" 30 if conf: 31 conf_pt = conf.get("global", {}).get("mount_point") 32 if conf_pt: 33 baseurl = conf_pt 24 34 25 35 point = baseurl.lstrip("/") … … 47 57 48 58 if conf is not None: 49 if isinstance(conf, dict): 50 cherrypy.config.update(updateMap=conf, baseurl=baseurl) 51 else: 52 cherrypy.config.update(file=conf, baseurl=baseurl) 59 cherrypy.config.update(updateMap=conf, baseurl=baseurl) 53 60 54 61 def mount_point(self, path=None):

