def check(gid): json = request.get_json() g = Group.get_one_by(group_id=gid) print('!!check json', json) u = current_user() result_id = Todo.toggleTodoGroup(json, u, g) return result_id
def add(gid): form = request.form print('!!tag add form', form) u = current_user() g = Group.get_one_by(group_id=gid) t = Tag.inserTag(form, u, g) return t
def add(gid): form = request.form print('!!note add form', form) u = current_user() g = Group.get_one_by(group_id=gid) t = Note.inserNote(form, u, g) return t
def add(gid): form = request.form print('!!project add form', form) # ImmutableMultiDict([('title', '的撒发射点法大师傅大师傅')]) u = current_user() g = Group.get_one_by(group_id=gid) t = Project.inserProject(form, u, g) return t
def add(gid): form = request.form print('!!add form', form) # ImmutableMultiDict([('title', '的撒发射点法大师傅大师傅')]) u = current_user() # u代表user g = Group.get_one_by(group_id=gid) t = Todo.inserTodo(form, u, g) s = '.' + gid return redirect(url_for(".index", gid=gid))
def all(gid): u = current_user() gu = Group.get_one_by(group_id=gid).users list = [] for g in gu: t = dict( name=g.name, icon=g.icon, email=g.email ) list.append(t) print(list) return json.dumps(list)
def all(gid): u = current_user() gu = Group.get_one_by(group_id=gid).users list = [] for g in gu: t = dict(name=g.name, icon=g.icon, email=g.email, performance=g.performance) list.append(t) def takep(u): return u['performance'] list.sort(key=takep, reverse=True) # 降序 print(list) return json.dumps(list)
def index(gid): u = current_user() g = Group.get_one_by(group_id=gid) print(g) return render_template("g_performance.html", user=u, group=g)
def all(gid): g = Group.get_one_by(group_id=gid) t_list = Todo.getAll(None, g) return (t_list)
def all(gid): u = current_user() g = Group.get_one_by(group_id=gid) print(g) list = Tag.getAll(None, g) return (list)
def all(gid): u=current_user() g = Group.get_one_by(group_id=gid) list = Note.getAll(None, g) return (list)