예제 #1
0
파일: g_index.py 프로젝트: Waterx/minitodo
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
예제 #2
0
파일: g_tags.py 프로젝트: Waterx/minitodo
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
예제 #3
0
파일: g_notes.py 프로젝트: Waterx/minitodo
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
예제 #4
0
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
예제 #5
0
파일: g_index.py 프로젝트: Waterx/minitodo
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))
예제 #6
0
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)
예제 #7
0
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)
예제 #8
0
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)
예제 #9
0
파일: g_index.py 프로젝트: Waterx/minitodo
def all(gid):
    g = Group.get_one_by(group_id=gid)
    t_list = Todo.getAll(None, g)
    return (t_list)
예제 #10
0
파일: g_tags.py 프로젝트: Waterx/minitodo
def all(gid):
    u = current_user()
    g = Group.get_one_by(group_id=gid)
    print(g)
    list = Tag.getAll(None, g)
    return (list)
예제 #11
0
파일: g_notes.py 프로젝트: Waterx/minitodo
def all(gid):
    u=current_user()
    g = Group.get_one_by(group_id=gid)
    list = Note.getAll(None, g)
    return (list)