On Fri, Dec 6, 2013 at 1:01 AM, Nguyễn Hồng Quân <
ng.hon...@gmail.com> wrote:
> Hi
>
> 2013/12/4 anh le <
anh...@gmail.com>
>>
>> Hi Quân,
>>
>> I do the config to turn on cpstats tool differently and it works:
>>
>> - d = wsgiserver.WSGIPathInfoDispatcher({'/': app, '/stat': cherryapp})
>> + d = wsgiserver.WSGIPathInfoDispatcher({'/': app, '/stat': cherryapp,
>> {'/stat': {'tools.cpstats.on': True}})
>
>
> Do you mean to put
> ```
> {'/stat': {'tools.cpstats.on': True}}
> ```
>
> into the line
> ```
> cherryapp = cherrypy.tree.mount(StatsPage(), '/stat')
> ```
> ?
>
> Unfortunately, my side doesn't work, because I'm running Python 3, and this
> module of CherryPy is not ported completely to Python 3 yet.
Sorry for the incorrect diff, it should read:
cherryapp = cherrypy.tree.mount(StatsPage(), '/stat', {'/stat':
{'tools.cpstats.on':True}})
d = wsgiserver.WSGIPathInfoDispatcher({'/': app, '/stat': cherryapp})
However as you point out that won't work for Python 3, I forgot to
check the version.