def linked_file_exists(self, widget): key = '/tg_widgets/%s' % widget.mod wp = configs.get(key) if wp: dir = wp.get('static_filter.dir') if dir: path = os.path.join(dir, widget.name) return os.path.exists(path) return False
def _extract_config(): from cherrypy.config import configs c = configs.get('global', {}).copy() c.update(configs['/']) return c