Esempio n. 1
0
 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
Esempio n. 2
0
 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
Esempio n. 3
0
def _extract_config():
    from cherrypy.config import configs
    c = configs.get('global', {}).copy()
    c.update(configs['/'])
    return c
Esempio n. 4
0
def _extract_config():
    from cherrypy.config import configs
    c = configs.get('global', {}).copy()
    c.update(configs['/'])
    return c