plots.py 文件源码

python
阅读 180 收藏 0 点赞 0 评论 0

项目:spc 作者: whbrewer 项目源码 文件源码
def edit_datasource_post(pltid, dsid):
    """update datasource for given plot"""
    user = root.authorized()
    if user != 'admin':
        return template('error', err="must be admin to edit plots")
    app = request.forms.get('app')
    r = request.forms
    datasource(id=dsid).update_record(label=r['label'], pltid=pltid, filename=r['fn'], cols=r['cols'],
                                      line_range=r['line_range'], data_def=r['data_def'])
    db.commit()
    redirect ('/plots/' + str(pltid) + '/datasources?app='+app)
    params = {'app': app, 'pltid': pltid, 'dsid': dsid}
    return template('plots/edit_datasource', params)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号