def gen_chara(): 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) result = DashboardService.genTactics(connect, session['user'], request.form['id']) connect.close() return json.dumps(result) return 'false'