Esempio n. 1
0
        math_lib = AF_Object.equation_lib
        alias = get_max_alias(math_lib.load_all().keys())
        new_math = Equation()
        new_math.set_propertys(**{
            'alias': alias,
            'name': title,
            'equation': body,
            'mode': math_type
        })
        math_lib.add_obj(new_math)
        rstring['alias'] = alias
        return [0, rstring]
    elif src_type == 'table':
        table_lib = AF_Object.tableform_lib
        alias = get_max_alias(table_lib.load_all().keys())
        new_table = Tableform()
        new_table.set_propertys(**{
            'alias': alias,
            'name': title,
            'tableform': body
        })
        table_lib.add_obj(new_table)
        rstring['alias'] = alias
        return [0, rstring]
    else:
        return [1, '本站尚不支持此类型资源,我们将继续改进!']


def fun_new_article_pic(user,
                        article_id=0,
                        article_type='blog',