def _edit_theme(user, app, context): if context.method=='get': themes = theme.get_themes(False) return { '__view__' : 'manage_edit_theme', 'current' : theme.get_current_theme(), 'themes' : [theme.get_theme_info(t) for t in themes], } if context.method=='post': pass
def compile_view(root_path): all_appdirs = os.listdir(root_path) appdirs = [app for app in all_appdirs if not app.endswith('test') and os.path.isdir(os.path.join(root_path, app, 'view'))] appdirs.sort() count = 0 for app in appdirs: if app=='theme': import theme themes = theme.get_themes(False) for t in themes: count += _compile_dir(root_path, app, view_dir=t) else: count += _compile_dir(root_path, app) # make sure __init__.py under root_path/compiled: _gen_init_py(os.path.join(root_path, 'compiled')) print 'total %d view(s) compiled.' % count
def compile_view(root_path): all_appdirs = os.listdir(root_path) appdirs = [ app for app in all_appdirs if not app.endswith('test') and os.path.isdir(os.path.join(root_path, app, 'view')) ] appdirs.sort() count = 0 for app in appdirs: if app == 'theme': import theme themes = theme.get_themes(False) for t in themes: count += _compile_dir(root_path, app, view_dir=t) else: count += _compile_dir(root_path, app) # make sure __init__.py under root_path/compiled: _gen_init_py(os.path.join(root_path, 'compiled')) print 'total %d view(s) compiled.' % count