【发布时间】:2011-11-25 08:39:00
【问题描述】:
我正在使用 Cherrypy v3.2。我找不到关于如何编写好的配置文件的好文档。目前这里是我所拥有的摘录(原始文件相当大):
[global]
server.thread_pool = 8
server.socket_host = '10.109.26.56'
server.socket_port = 8000
tools.sessions.on = True
[/]
tools.staticdir.root = "C:\Documents and Settings\ginssj\Desktop\cherry"
[/img/loading_transparent.gif]
tools.staticfile.on = True
tools.staticfile.filename = "C:\Documents and Settings\ginssj\Desktop\cherry\img\loading_transparent.gif"
[/style/jquery.jgrowl.css]
tools.staticfile.on = True
tools.staticfile.filename = "C:\Documents and Settings\ginssj\Desktop\cherry\style\jquery.jgrowl.css"
[/style/iegl/Samples.css]
tools.staticfile.on = True
tools.staticfile.filename = "C:\Documents and Settings\ginssj\Desktop\cherry\style\iegl\Samples.css"
问题是我的应用程序必须部署在不同的机器上,而且我只想更改绝对根路径一次。是否可以将其他路径指定为相对于我在顶部指定的根?
【问题讨论】: