Exemple #1
0
def mymetamodels(session):
    if "user" in session:
        connect = MySQLdb.connect(
            db=config.DB_NAME, host=config.DB_HOST, port=config.DB_PORT, user=config.DB_USER, passwd=config.DB_PASSWD
        )
        mymetamodels = MetaModelService.loadMyOwnMetaModelList(session["user"], connect)
        connect.close()
        return json.dumps(mymetamodels)
Exemple #2
0
def mydashboard(user):
    connect = MySQLdb.connect(
        db=config.DB_NAME, host=config.DB_HOST, port=config.DB_PORT, user=config.DB_USER, passwd=config.DB_PASSWD
    )
    myprojects = ProjectService.loadMyOwnProjectList(user, connect)
    mymetamodels = MetaModelService.loadMyOwnMetaModelList(user, connect)
    mytools = MetaModelService.loadMyTools(user, connect)
    # accountinfo = UserService.getAccountInfo()
    connect.close()
    return render_template(
        "mydashboard.html",
        myprojects=json.dumps(myprojects),
        mymetamodels=json.dumps(mymetamodels),
        mytools=json.dumps(mytools),
    )