미니 팀 프로젝트 피드백 해결 과정 - 1
2023. 3. 17. 20:53ㆍteam/team project
피드백
- 플라스크 함수 5개 썼는데 하나만 사용해서 같은 결과가 나오게끔 고민해 보세요.
내가 시도해 본 것들
- 플라스크 함수 5개 썼는데 하나만 사용하도록 고민해 보기
#팀장님 소개페이지
@app.route("/1/<id>", methods=["GET"])
def detail_kgh_get(id):
teamlist = db.team.find_one({'name': id}, {'_id': False})
reviews = list(db.reviewlist.find({'name':id},{'_id':False}))
print(teamlist, reviews)
return render_template('index_introduce_kgh.html', data=teamlist, data1 = reviews)
#팀원1님 소개페이지
@app.route("/2/<id>", methods=["GET"])
def detail_mdh_get(id):
teamlist = db.team.find_one({'name': id}, {'_id': False})
reviews = list(db.reviewlist.find({'name':id},{'_id':False}))
print(teamlist, reviews)
return render_template('index_introduce_mdh.html', data=teamlist, data1 = reviews)
#팀원2님 소개페이지
@app.route("/3/<id>", methods=["GET"])
def detail_lsm_get(id):
teamlist = db.team.find_one({'name': id}, {'_id': False})
reviews = list(db.reviewlist.find({'name':id},{'_id':False}))
print(teamlist, reviews)
return render_template('index_introduce_lsm.html', data=teamlist, data1 = reviews)
#팀원3님 소개페이지
@app.route("/4/<id>", methods=["GET"])
def detail_ijh_get(id):
teamlist = db.team.find_one({'name': id}, {'_id': False})
reviews = list(db.reviewlist.find({'name':id},{'_id':False}))
print(teamlist, reviews)
return render_template('index_introduce_ijh.html', data=teamlist, data1 = reviews)
#팀원4님 소개페이지
@app.route("/5/<id>", methods=["GET"])
def detail_hsy_get(id):
teamlist = db.team.find_one({'name': id}, {'_id': False})
reviews = list(db.reviewlist.find({'name':id},{'_id':False}))
print(teamlist, reviews)
return render_template('index_introduce_hsy.html', data=teamlist, data1 = reviews)
현재는 위와 같이 팀원 다섯명의 페이지를 다 따로 지정해서 GET을 하였습니다.
해결
아직은 해결 방법을 더 찾아봐야 할 것 같습니다.
새롭게 알게 된 것
내가 복잡한데? 라고 느낄 정도면 이미 간단하게 만들 해결책이 분명히 있다는 것을 느꼈습니다.
꼭 방법을 찾아내고 말겠습니다!
'team > team project' 카테고리의 다른 글
A7 - Eco Canvas 로고 (0) | 2023.07.05 |
---|---|
A6조 팀 프로젝트 S.A (2) | 2023.05.22 |
미니 팀 프로젝트 피드백 해결 과정 - 2 (0) | 2023.03.19 |