示例#1
0
def set():
    r = Base()
    r(db=db, auth=auth)
    r.render('/admin/config/manage.html')
    config = AppConfigLoader()
    if config.set_attribute(request.args(0), request.args(1), request.args(2)):
        AppConfig(reload=True)
        response.flash = 'Configuration updated'
示例#2
0
def manage():
    r = Base()
    r(db=db, auth=auth)
    r.render('/admin/config/manage.html')

    if request.env.request_method == 'GET':
        return dict(settings=AppConfig(reload=True), tab=None)
    elif request.env.request_method == 'POST':
        config = AppConfigLoader()
        if config.set_conf(request.vars):
            response.flash = 'Configuration updated'
            return dict(settings=AppConfig(reload=True), tab=request.vars.section)

        response.flash = 'Uppss error...'
        return dict(settings=AppConfig(reload=True), tab=request.vars.section)