Ejemplo n.º 1
0
def __handle_get_theme():
    '''
    Display all themes under dir '/theme'
    '''
    themes = manage.get_themes()
    selected = shared.get_setting('theme', 'selected', '')
    if not selected in themes:
        selected = themes[0]
    return {'template': 'theme.html', 'themes': themes, 'selected': selected}
Ejemplo n.º 2
0
def __handle_get_theme():
    '''
    Display all themes under dir '/theme'
    '''
    themes = manage.get_themes()
    selected = shared.get_setting('theme', 'selected', '')
    if not selected in themes:
        selected = themes[0]
    return {
            'template' : 'theme.html',
            'themes' : themes,
            'selected' : selected
    }
Ejemplo n.º 3
0
def update_model(rootpath, appname, model):

    # set current theme = 'simple':
    theme = shared.get_setting('theme', 'selected', '')
    if not theme:
        themes = manage.get_themes()
        theme = themes[0]
        shared.save_setting('theme', 'selected', theme)
    model['theme'] = theme
    # add widgets:
    instances = widget.get_widget_instances()
    all_settings = widget.get_all_instances_settings()
    widget.bind_instance_model(instances, all_settings)
    import logging
    model['widgets'] = instances
    model['show_widget__raw__'] = show_widget
    logging.warning('loaded ' + str(instances))
Ejemplo n.º 4
0
def update_model(rootpath, appname, model):

    # set current theme = 'simple':
    theme = shared.get_setting('theme', 'selected', '')
    if not theme:
        themes = manage.get_themes()
        theme = themes[0]
        shared.save_setting('theme', 'selected', theme)
    model['theme'] = theme
    # add widgets:
    instances = widget.get_widget_instances()
    all_settings = widget.get_all_instances_settings()
    widget.bind_instance_model(instances, all_settings)
    import logging
    model['widgets'] = instances
    model['show_widget__raw__'] = show_widget
    logging.warning('loaded ' + str(instances))