Skip to content

Commit

Permalink
add user history comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevinjyp committed Jun 10, 2019
1 parent 2eee513 commit 2e1059b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions rateMyCourse/views/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ def get_user_detail(request) -> HttpResponse:
retlist['gender'] = user.gender
retlist['self_introduction'] = user.self_introduction
retlist['profile_photo'] = user.profile_photo
retlist['user_comments'] = []

for user_comment in MakeComment.objects.filter(user=user):
retlist['user_comments'].append(user_comment.comment.ret())

except Exception:
return HttpResponse(formatException(-1, '缺失必要的信息'), content_type="application/json")

Expand Down

0 comments on commit 2e1059b

Please sign in to comment.