{"action":"created","comment":{"url":"https://api.github.com/repos/hangpark/kaistusc/pulls/comments/168382632","pull_request_review_id":96739212,"id":168382632,"diff_hunk":"@@ -158,35 +200,49 @@ def get_context_data(self, **kwargs):\n         게시글과 관련 정보를 컨텍스트에 저장하는 메서드.\n         \"\"\"\n         context = super().get_context_data(**kwargs)\n-\n         # 게시글 저장\n         context['post'] = self.post_\n-\n         # 게시글에 달린 댓글 목록 저장\n         context['comments'] = self.post_.comment_set.all()\n+        comments_files = {}\n+        for comment in context['comments']:\n+            if(comment.attached_file()):\n+                comments_files[comment.id] = comment.attached_file()\n+        context['comments_files'] =comments_files\n \n         # 게시글에 첨부된 파일 목록 저장\n         context['files'] = self.post_.attachedfile_set.all()\n \n         return context\n \n \n+\n class PostWriteView(BoardView):\n     \"\"\"\n     게시글 등록 뷰.\n \n     기본 필요권한이 쓰기권한으로 설정되어 있습니다.\n     \"\"\"\n \n-    template_name = 'board/post_form.jinja'\n+    template_name = 'board/post_form/post_form.jinja'\n     required_permission = PERM_WRITE\n \n     def get_context_data(self, **kwargs):\n         \"\"\"\n         게시글 작성 폼을 컨텍스트에 추가하는 메서드.\n         \"\"\"\n         context = super().get_context_data(**kwargs)\n-        context['form'] = PostForm(self.service.board)\n+        board_role = context['board'].role\n+\n+        if board_role == BOARD_ROLE_PROJECT:\n+            post_form = ProjectPostForm\n+        elif board_role == BOARD_ROLE_DEBATE:\n+            post_form = DebateForm\n+        else:\n+            post_form = PostForm","path":"apps/board/views.py","position":191,"original_position":191,"commit_id":"f37945e5e4e8fcec85ce8f7340d9579610de4e89","original_commit_id":"f37945e5e4e8fcec85ce8f7340d9579610de4e89","user":{"login":"ashe-sparcs","id":15705385,"avatar_url":"https://avatars0.githubusercontent.com/u/15705385?v=4","gravatar_id":"","url":"https://api.github.com/users/ashe-sparcs","html_url":"https://github.com/ashe-sparcs","followers_url":"https://api.github.com/users/ashe-sparcs/followers","following_url":"https://api.github.com/users/ashe-sparcs/following{/other_user}","gists_url":"https://api.github.com/users/ashe-sparcs/gists{/gist_id}","starred_url":"https://api.github.com/users/ashe-sparcs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashe-sparcs/subscriptions","organizations_url":"https://api.github.com/users/ashe-sparcs/orgs","repos_url":"https://api.github.com/users/ashe-sparcs/repos","events_url":"https://api.github.com/users/ashe-sparcs/events{/privacy}","received_events_url":"https://api.github.com/users/ashe-sparcs/received_events","type":"User","site_admin":false},"body":"이것도 상수 --> 모델 클래스 매핑과 마찬가지고 폼에 대해서도 있으면 좋겠습니다.","created_at":"2018-02-15T05:24:04Z","updated_at":"2018-02-15T05:24:04Z","html_url":"https://github.com/hangpark/kaistusc/pull/139#discussion_r168382632","pull_request_url":"https://api.github.com/repos/hangpark/kaistusc/pulls/139","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/hangpark/kaistusc/pulls/comments/168382632"},"html":{"href":"https://github.com/hangpark/kaistusc/pull/139#discussion_r168382632"},"pull_request":{"href":"https://api.github.com/repos/hangpark/kaistusc/pulls/139"}}},"pull_request":{"url":"https://api.github.com/repos/hangpark/kaistusc/pulls/139","id":168920638,"html_url":"https://github.com/hangpark/kaistusc/pull/139","diff_url":"https://github.com/hangpark/kaistusc/pull/139.diff","patch_url":"https://github.com/hangpark/kaistusc/pull/139.patch","issue_url":"https://api.github.com/repos/hangpark/kaistusc/issues/139","number":139,"state":"open","locked":false,"title":"#119, #122","user":{"login":"etranger-park","id":26505161,"avatar_url":"https://avatars1.githubusercontent.com/u/26505161?v=4","gravatar_id":"","url":"https://api.github.com/users/etranger-park","html_url":"https://github.com/etranger-park","followers_url":"https://api.github.com/users/etranger-park/followers","following_url":"https://api.github.com/users/etranger-park/following{/other_user}","gists_url":"https://api.github.com/users/etranger-park/gists{/gist_id}","starred_url":"https://api.github.com/users/etranger-park/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/etranger-park/subscriptions","organizations_url":"https://api.github.com/users/etranger-park/orgs","repos_url":"https://api.github.com/users/etranger-park/repos","events_url":"https://api.github.com/users/etranger-park/events{/privacy}","received_events_url":"https://api.github.com/users/etranger-park/received_events","type":"User","site_admin":false},"body":"for #119\r\n\r\nrole이 '논의'인 보드의 게시물에서 댓글에 파일을 첨부할 수 있습니다.\r\n댓글을 올리는 디자인이 조금 변경되었습니다.\r\nfor #122\r\n\r\nrole이 논의인 보드를 제작하였습니다.\r\n공지 기능이 있어, 관리자 글이 상단에 위치하는 기능을 별도로 추가하지 않았습니다 .\r\n논의중, 종료, 청원중, 전체 보기의 필터링을 제공합니다 .\r\njquery ui 를 사용합니다. 관련된 파일들을 gulp를 통해서 dist로 보내주는 작업을 gulpfilse.js에 추가하였습니다..","created_at":"2018-02-13T18:23:47Z","updated_at":"2018-02-15T05:24:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e98265cb1ca86890394fff2e4aaeb5d1c3399088","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/hangpark/kaistusc/pulls/139/commits","review_comments_url":"https://api.github.com/repos/hangpark/kaistusc/pulls/139/comments","review_comment_url":"https://api.github.com/repos/hangpark/kaistusc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hangpark/kaistusc/issues/139/comments","statuses_url":"https://api.github.com/repos/hangpark/kaistusc/statuses/f37945e5e4e8fcec85ce8f7340d9579610de4e89","head":{"label":"etranger-park:develop","ref":"develop","sha":"f37945e5e4e8fcec85ce8f7340d9579610de4e89","user":{"login":"etranger-park","id":26505161,"avatar_url":"https://avatars1.githubusercontent.com/u/26505161?v=4","gravatar_id":"","url":"https://api.github.com/users/etranger-park","html_url":"https://github.com/etranger-park","followers_url":"https://api.github.com/users/etranger-park/followers","following_url":"https://api.github.com/users/etranger-park/following{/other_user}","gists_url":"https://api.github.com/users/etranger-park/gists{/gist_id}","starred_url":"https://api.github.com/users/etranger-park/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/etranger-park/subscriptions","organizations_url":"https://api.github.com/users/etranger-park/orgs","repos_url":"https://api.github.com/users/etranger-park/repos","events_url":"https://api.github.com/users/etranger-park/events{/privacy}","received_events_url":"https://api.github.com/users/etranger-park/received_events","type":"User","site_admin":false},"repo":{"id":120711136,"name":"kaistusc","full_name":"etranger-park/kaistusc","owner":{"login":"etranger-park","id":26505161,"avatar_url":"https://avatars1.githubusercontent.com/u/26505161?v=4","gravatar_id":"","url":"https://api.github.com/users/etranger-park","html_url":"https://github.com/etranger-park","followers_url":"https://api.github.com/users/etranger-park/followers","following_url":"https://api.github.com/users/etranger-park/following{/other_user}","gists_url":"https://api.github.com/users/etranger-park/gists{/gist_id}","starred_url":"https://api.github.com/users/etranger-park/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/etranger-park/subscriptions","organizations_url":"https://api.github.com/users/etranger-park/orgs","repos_url":"https://api.github.com/users/etranger-park/repos","events_url":"https://api.github.com/users/etranger-park/events{/privacy}","received_events_url":"https://api.github.com/users/etranger-park/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/etranger-park/kaistusc","description":"KAIST Undergraduate Student Council Website on Django","fork":true,"url":"https://api.github.com/repos/etranger-park/kaistusc","forks_url":"https://api.github.com/repos/etranger-park/kaistusc/forks","keys_url":"https://api.github.com/repos/etranger-park/kaistusc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/etranger-park/kaistusc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/etranger-park/kaistusc/teams","hooks_url":"https://api.github.com/repos/etranger-park/kaistusc/hooks","issue_events_url":"https://api.github.com/repos/etranger-park/kaistusc/issues/events{/number}","events_url":"https://api.github.com/repos/etranger-park/kaistusc/events","assignees_url":"https://api.github.com/repos/etranger-park/kaistusc/assignees{/user}","branches_url":"https://api.github.com/repos/etranger-park/kaistusc/branches{/branch}","tags_url":"https://api.github.com/repos/etranger-park/kaistusc/tags","blobs_url":"https://api.github.com/repos/etranger-park/kaistusc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/etranger-park/kaistusc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/etranger-park/kaistusc/git/refs{/sha}","trees_url":"https://api.github.com/repos/etranger-park/kaistusc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/etranger-park/kaistusc/statuses/{sha}","languages_url":"https://api.github.com/repos/etranger-park/kaistusc/languages","stargazers_url":"https://api.github.com/repos/etranger-park/kaistusc/stargazers","contributors_url":"https://api.github.com/repos/etranger-park/kaistusc/contributors","subscribers_url":"https://api.github.com/repos/etranger-park/kaistusc/subscribers","subscription_url":"https://api.github.com/repos/etranger-park/kaistusc/subscription","commits_url":"https://api.github.com/repos/etranger-park/kaistusc/commits{/sha}","git_commits_url":"https://api.github.com/repos/etranger-park/kaistusc/git/commits{/sha}","comments_url":"https://api.github.com/repos/etranger-park/kaistusc/comments{/number}","issue_comment_url":"https://api.github.com/repos/etranger-park/kaistusc/issues/comments{/number}","contents_url":"https://api.github.com/repos/etranger-park/kaistusc/contents/{+path}","compare_url":"https://api.github.com/repos/etranger-park/kaistusc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/etranger-park/kaistusc/merges","archive_url":"https://api.github.com/repos/etranger-park/kaistusc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/etranger-park/kaistusc/downloads","issues_url":"https://api.github.com/repos/etranger-park/kaistusc/issues{/number}","pulls_url":"https://api.github.com/repos/etranger-park/kaistusc/pulls{/number}","milestones_url":"https://api.github.com/repos/etranger-park/kaistusc/milestones{/number}","notifications_url":"https://api.github.com/repos/etranger-park/kaistusc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/etranger-park/kaistusc/labels{/name}","releases_url":"https://api.github.com/repos/etranger-park/kaistusc/releases{/id}","deployments_url":"https://api.github.com/repos/etranger-park/kaistusc/deployments","created_at":"2018-02-08T04:33:06Z","updated_at":"2018-02-08T04:33:08Z","pushed_at":"2018-02-14T19:32:55Z","git_url":"git://github.com/etranger-park/kaistusc.git","ssh_url":"git@github.com:etranger-park/kaistusc.git","clone_url":"https://github.com/etranger-park/kaistusc.git","svn_url":"https://github.com/etranger-park/kaistusc","homepage":"https://student.kaist.ac.kr/","size":2288,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"hangpark:develop","ref":"develop","sha":"9b715fc61d1f1048a31347a99189fe770b7ae576","user":{"login":"hangpark","id":13899323,"avatar_url":"https://avatars0.githubusercontent.com/u/13899323?v=4","gravatar_id":"","url":"https://api.github.com/users/hangpark","html_url":"https://github.com/hangpark","followers_url":"https://api.github.com/users/hangpark/followers","following_url":"https://api.github.com/users/hangpark/following{/other_user}","gists_url":"https://api.github.com/users/hangpark/gists{/gist_id}","starred_url":"https://api.github.com/users/hangpark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hangpark/subscriptions","organizations_url":"https://api.github.com/users/hangpark/orgs","repos_url":"https://api.github.com/users/hangpark/repos","events_url":"https://api.github.com/users/hangpark/events{/privacy}","received_events_url":"https://api.github.com/users/hangpark/received_events","type":"User","site_admin":false},"repo":{"id":77471196,"name":"kaistusc","full_name":"hangpark/kaistusc","owner":{"login":"hangpark","id":13899323,"avatar_url":"https://avatars0.githubusercontent.com/u/13899323?v=4","gravatar_id":"","url":"https://api.github.com/users/hangpark","html_url":"https://github.com/hangpark","followers_url":"https://api.github.com/users/hangpark/followers","following_url":"https://api.github.com/users/hangpark/following{/other_user}","gists_url":"https://api.github.com/users/hangpark/gists{/gist_id}","starred_url":"https://api.github.com/users/hangpark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hangpark/subscriptions","organizations_url":"https://api.github.com/users/hangpark/orgs","repos_url":"https://api.github.com/users/hangpark/repos","events_url":"https://api.github.com/users/hangpark/events{/privacy}","received_events_url":"https://api.github.com/users/hangpark/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hangpark/kaistusc","description":"KAIST Undergraduate Student Council Website on Django","fork":false,"url":"https://api.github.com/repos/hangpark/kaistusc","forks_url":"https://api.github.com/repos/hangpark/kaistusc/forks","keys_url":"https://api.github.com/repos/hangpark/kaistusc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hangpark/kaistusc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hangpark/kaistusc/teams","hooks_url":"https://api.github.com/repos/hangpark/kaistusc/hooks","issue_events_url":"https://api.github.com/repos/hangpark/kaistusc/issues/events{/number}","events_url":"https://api.github.com/repos/hangpark/kaistusc/events","assignees_url":"https://api.github.com/repos/hangpark/kaistusc/assignees{/user}","branches_url":"https://api.github.com/repos/hangpark/kaistusc/branches{/branch}","tags_url":"https://api.github.com/repos/hangpark/kaistusc/tags","blobs_url":"https://api.github.com/repos/hangpark/kaistusc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hangpark/kaistusc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hangpark/kaistusc/git/refs{/sha}","trees_url":"https://api.github.com/repos/hangpark/kaistusc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hangpark/kaistusc/statuses/{sha}","languages_url":"https://api.github.com/repos/hangpark/kaistusc/languages","stargazers_url":"https://api.github.com/repos/hangpark/kaistusc/stargazers","contributors_url":"https://api.github.com/repos/hangpark/kaistusc/contributors","subscribers_url":"https://api.github.com/repos/hangpark/kaistusc/subscribers","subscription_url":"https://api.github.com/repos/hangpark/kaistusc/subscription","commits_url":"https://api.github.com/repos/hangpark/kaistusc/commits{/sha}","git_commits_url":"https://api.github.com/repos/hangpark/kaistusc/git/commits{/sha}","comments_url":"https://api.github.com/repos/hangpark/kaistusc/comments{/number}","issue_comment_url":"https://api.github.com/repos/hangpark/kaistusc/issues/comments{/number}","contents_url":"https://api.github.com/repos/hangpark/kaistusc/contents/{+path}","compare_url":"https://api.github.com/repos/hangpark/kaistusc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hangpark/kaistusc/merges","archive_url":"https://api.github.com/repos/hangpark/kaistusc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hangpark/kaistusc/downloads","issues_url":"https://api.github.com/repos/hangpark/kaistusc/issues{/number}","pulls_url":"https://api.github.com/repos/hangpark/kaistusc/pulls{/number}","milestones_url":"https://api.github.com/repos/hangpark/kaistusc/milestones{/number}","notifications_url":"https://api.github.com/repos/hangpark/kaistusc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hangpark/kaistusc/labels{/name}","releases_url":"https://api.github.com/repos/hangpark/kaistusc/releases{/id}","deployments_url":"https://api.github.com/repos/hangpark/kaistusc/deployments","created_at":"2016-12-27T17:14:54Z","updated_at":"2018-02-06T07:58:49Z","pushed_at":"2018-02-14T19:32:57Z","git_url":"git://github.com/hangpark/kaistusc.git","ssh_url":"git@github.com:hangpark/kaistusc.git","clone_url":"https://github.com/hangpark/kaistusc.git","svn_url":"https://github.com/hangpark/kaistusc","homepage":"https://student.kaist.ac.kr/","size":2175,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":24,"license":{"key":"bsd-2-clause","name":"BSD 2-Clause \"Simplified\" License","spdx_id":"BSD-2-Clause","url":"https://api.github.com/licenses/bsd-2-clause"},"forks":3,"open_issues":24,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hangpark/kaistusc/pulls/139"},"html":{"href":"https://github.com/hangpark/kaistusc/pull/139"},"issue":{"href":"https://api.github.com/repos/hangpark/kaistusc/issues/139"},"comments":{"href":"https://api.github.com/repos/hangpark/kaistusc/issues/139/comments"},"review_comments":{"href":"https://api.github.com/repos/hangpark/kaistusc/pulls/139/comments"},"review_comment":{"href":"https://api.github.com/repos/hangpark/kaistusc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hangpark/kaistusc/pulls/139/commits"},"statuses":{"href":"https://api.github.com/repos/hangpark/kaistusc/statuses/f37945e5e4e8fcec85ce8f7340d9579610de4e89"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"ashe-sparcs"}}