Код: Выделить всё
self.conf [ '/images' ] = {
'tools.staticdir.on': True,
'tools.staticdir.dir': startDir
}
cherrypy.config.update ( self.conf )
Код: Выделить всё
self.conf [ '/images' ] = {
'tools.staticdir.on': True,
'tools.staticdir.dir': newDir
}
cherrypy.config.update ( self.conf )
Я тоже пробовал
Код: Выделить всё
cherrypy.lib.static.staticdir( section="images" , dir=self.path , debug=True )
Как я могу динамически менять обслуживаемый каталог?
Подробнее здесь: https://stackoverflow.com/questions/787 ... figuration