{"action":"created","comment":{"url":"https://api.github.com/repos/rapirent/smart_campus/pulls/comments/140447502","pull_request_review_id":64518483,"id":140447502,"diff_hunk":"@@ -1036,3 +1067,153 @@ def travelplan_delete_page(request, pk):\n     travelplan.delete()\n \n     return HttpResponseRedirect('/travelplans/')\n+\n+\n+@login_required\n+def question_list_page(request):\n+    if request.user.is_administrator():\n+        stations = Station.objects.all()\n+        question_list = Question.objects.all().order_by('id')\n+    else:\n+        stations = Satation.objects.filter(owner_group=request.user.group)\n+        question_list = Question.objects.filter(\n+            linked_station__in=stations\n+        ).order_by('id')\n+\n+    paginator = Paginator(question_list, 10)\n+\n+    page = request.GET.get('page', 1)\n+    try:\n+        questions = paginator.page(page)\n+    except PageNotAnInteger:\n+        questions = paginator.page(1)\n+    except EmptyPage:\n+        questions = paginator.page(paginator.num_pages)\n+\n+    context = {\n+        'questions': questions,\n+        'email': request.user.email,\n+        'categories': StationCategory.objects.all().order_by('id')\n+    }\n+\n+    return render(request, 'app/question_list_page.html', context)\n+\n+\n+@login_required\n+def question_add_page(request):\n+\n+    if request.method == 'POST':\n+        form = QuestionForm(request.POST)\n+\n+        if form.is_valid():\n+            question = form.save()\n+\n+            choice_contents = request.POST.getlist('choice_contents')\n+            answer_order = int(request.POST.get('answer', 1))\n+\n+            for order, choice_contnet in enumerate(choice_contents, start=1):","path":"smart_campus/app/views.py","position":242,"original_position":242,"commit_id":"f0669427bf258f850d18b3ccaf0c354d324337fd","original_commit_id":"f0669427bf258f850d18b3ccaf0c354d324337fd","user":{"login":"Lee-W","id":5144808,"avatar_url":"https://avatars3.githubusercontent.com/u/5144808?v=4","gravatar_id":"","url":"https://api.github.com/users/Lee-W","html_url":"https://github.com/Lee-W","followers_url":"https://api.github.com/users/Lee-W/followers","following_url":"https://api.github.com/users/Lee-W/following{/other_user}","gists_url":"https://api.github.com/users/Lee-W/gists{/gist_id}","starred_url":"https://api.github.com/users/Lee-W/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lee-W/subscriptions","organizations_url":"https://api.github.com/users/Lee-W/orgs","repos_url":"https://api.github.com/users/Lee-W/repos","events_url":"https://api.github.com/users/Lee-W/events{/privacy}","received_events_url":"https://api.github.com/users/Lee-W/received_events","type":"User","site_admin":false},"body":"`order`?","created_at":"2017-09-22T09:19:15Z","updated_at":"2017-09-22T09:20:59Z","html_url":"https://github.com/rapirent/smart_campus/pull/13#discussion_r140447502","pull_request_url":"https://api.github.com/repos/rapirent/smart_campus/pulls/13","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/rapirent/smart_campus/pulls/comments/140447502"},"html":{"href":"https://github.com/rapirent/smart_campus/pull/13#discussion_r140447502"},"pull_request":{"href":"https://api.github.com/repos/rapirent/smart_campus/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/rapirent/smart_campus/pulls/13","id":142093270,"html_url":"https://github.com/rapirent/smart_campus/pull/13","diff_url":"https://github.com/rapirent/smart_campus/pull/13.diff","patch_url":"https://github.com/rapirent/smart_campus/pull/13.patch","issue_url":"https://api.github.com/repos/rapirent/smart_campus/issues/13","number":13,"state":"open","locked":false,"title":"Develop question api","user":{"login":"rapirent","id":15178515,"avatar_url":"https://avatars1.githubusercontent.com/u/15178515?v=4","gravatar_id":"","url":"https://api.github.com/users/rapirent","html_url":"https://github.com/rapirent","followers_url":"https://api.github.com/users/rapirent/followers","following_url":"https://api.github.com/users/rapirent/following{/other_user}","gists_url":"https://api.github.com/users/rapirent/gists{/gist_id}","starred_url":"https://api.github.com/users/rapirent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rapirent/subscriptions","organizations_url":"https://api.github.com/users/rapirent/orgs","repos_url":"https://api.github.com/users/rapirent/repos","events_url":"https://api.github.com/users/rapirent/events{/privacy}","received_events_url":"https://api.github.com/users/rapirent/received_events","type":"User","site_admin":false},"body":"- Add the question page & view function.","created_at":"2017-09-20T13:02:22Z","updated_at":"2017-09-22T09:20:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"09ea5a8b6ae84dff9b181e1fbb8a1a4d8337e722","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/rapirent/smart_campus/pulls/13/commits","review_comments_url":"https://api.github.com/repos/rapirent/smart_campus/pulls/13/comments","review_comment_url":"https://api.github.com/repos/rapirent/smart_campus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rapirent/smart_campus/issues/13/comments","statuses_url":"https://api.github.com/repos/rapirent/smart_campus/statuses/f0669427bf258f850d18b3ccaf0c354d324337fd","head":{"label":"rapirent:develop-question-API","ref":"develop-question-API","sha":"f0669427bf258f850d18b3ccaf0c354d324337fd","user":{"login":"rapirent","id":15178515,"avatar_url":"https://avatars1.githubusercontent.com/u/15178515?v=4","gravatar_id":"","url":"https://api.github.com/users/rapirent","html_url":"https://github.com/rapirent","followers_url":"https://api.github.com/users/rapirent/followers","following_url":"https://api.github.com/users/rapirent/following{/other_user}","gists_url":"https://api.github.com/users/rapirent/gists{/gist_id}","starred_url":"https://api.github.com/users/rapirent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rapirent/subscriptions","organizations_url":"https://api.github.com/users/rapirent/orgs","repos_url":"https://api.github.com/users/rapirent/repos","events_url":"https://api.github.com/users/rapirent/events{/privacy}","received_events_url":"https://api.github.com/users/rapirent/received_events","type":"User","site_admin":false},"repo":{"id":99562171,"name":"smart_campus","full_name":"rapirent/smart_campus","owner":{"login":"rapirent","id":15178515,"avatar_url":"https://avatars1.githubusercontent.com/u/15178515?v=4","gravatar_id":"","url":"https://api.github.com/users/rapirent","html_url":"https://github.com/rapirent","followers_url":"https://api.github.com/users/rapirent/followers","following_url":"https://api.github.com/users/rapirent/following{/other_user}","gists_url":"https://api.github.com/users/rapirent/gists{/gist_id}","starred_url":"https://api.github.com/users/rapirent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rapirent/subscriptions","organizations_url":"https://api.github.com/users/rapirent/orgs","repos_url":"https://api.github.com/users/rapirent/repos","events_url":"https://api.github.com/users/rapirent/events{/privacy}","received_events_url":"https://api.github.com/users/rapirent/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rapirent/smart_campus","description":null,"fork":false,"url":"https://api.github.com/repos/rapirent/smart_campus","forks_url":"https://api.github.com/repos/rapirent/smart_campus/forks","keys_url":"https://api.github.com/repos/rapirent/smart_campus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rapirent/smart_campus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rapirent/smart_campus/teams","hooks_url":"https://api.github.com/repos/rapirent/smart_campus/hooks","issue_events_url":"https://api.github.com/repos/rapirent/smart_campus/issues/events{/number}","events_url":"https://api.github.com/repos/rapirent/smart_campus/events","assignees_url":"https://api.github.com/repos/rapirent/smart_campus/assignees{/user}","branches_url":"https://api.github.com/repos/rapirent/smart_campus/branches{/branch}","tags_url":"https://api.github.com/repos/rapirent/smart_campus/tags","blobs_url":"https://api.github.com/repos/rapirent/smart_campus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rapirent/smart_campus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rapirent/smart_campus/git/refs{/sha}","trees_url":"https://api.github.com/repos/rapirent/smart_campus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rapirent/smart_campus/statuses/{sha}","languages_url":"https://api.github.com/repos/rapirent/smart_campus/languages","stargazers_url":"https://api.github.com/repos/rapirent/smart_campus/stargazers","contributors_url":"https://api.github.com/repos/rapirent/smart_campus/contributors","subscribers_url":"https://api.github.com/repos/rapirent/smart_campus/subscribers","subscription_url":"https://api.github.com/repos/rapirent/smart_campus/subscription","commits_url":"https://api.github.com/repos/rapirent/smart_campus/commits{/sha}","git_commits_url":"https://api.github.com/repos/rapirent/smart_campus/git/commits{/sha}","comments_url":"https://api.github.com/repos/rapirent/smart_campus/comments{/number}","issue_comment_url":"https://api.github.com/repos/rapirent/smart_campus/issues/comments{/number}","contents_url":"https://api.github.com/repos/rapirent/smart_campus/contents/{+path}","compare_url":"https://api.github.com/repos/rapirent/smart_campus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rapirent/smart_campus/merges","archive_url":"https://api.github.com/repos/rapirent/smart_campus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rapirent/smart_campus/downloads","issues_url":"https://api.github.com/repos/rapirent/smart_campus/issues{/number}","pulls_url":"https://api.github.com/repos/rapirent/smart_campus/pulls{/number}","milestones_url":"https://api.github.com/repos/rapirent/smart_campus/milestones{/number}","notifications_url":"https://api.github.com/repos/rapirent/smart_campus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rapirent/smart_campus/labels{/name}","releases_url":"https://api.github.com/repos/rapirent/smart_campus/releases{/id}","deployments_url":"https://api.github.com/repos/rapirent/smart_campus/deployments","created_at":"2017-08-07T09:41:08Z","updated_at":"2017-08-28T11:36:56Z","pushed_at":"2017-09-22T09:13:56Z","git_url":"git://github.com/rapirent/smart_campus.git","ssh_url":"git@github.com:rapirent/smart_campus.git","clone_url":"https://github.com/rapirent/smart_campus.git","svn_url":"https://github.com/rapirent/smart_campus","homepage":null,"size":5675,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"develop"}},"base":{"label":"rapirent:develop","ref":"develop","sha":"40849d3b3a6b3a4424e8166652cfb0c817fe896d","user":{"login":"rapirent","id":15178515,"avatar_url":"https://avatars1.githubusercontent.com/u/15178515?v=4","gravatar_id":"","url":"https://api.github.com/users/rapirent","html_url":"https://github.com/rapirent","followers_url":"https://api.github.com/users/rapirent/followers","following_url":"https://api.github.com/users/rapirent/following{/other_user}","gists_url":"https://api.github.com/users/rapirent/gists{/gist_id}","starred_url":"https://api.github.com/users/rapirent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rapirent/subscriptions","organizations_url":"https://api.github.com/users/rapirent/orgs","repos_url":"https://api.github.com/users/rapirent/repos","events_url":"https://api.github.com/users/rapirent/events{/privacy}","received_events_url":"https://api.github.com/users/rapirent/received_events","type":"User","site_admin":false},"repo":{"id":99562171,"name":"smart_campus","full_name":"rapirent/smart_campus","owner":{"login":"rapirent","id":15178515,"avatar_url":"https://avatars1.githubusercontent.com/u/15178515?v=4","gravatar_id":"","url":"https://api.github.com/users/rapirent","html_url":"https://github.com/rapirent","followers_url":"https://api.github.com/users/rapirent/followers","following_url":"https://api.github.com/users/rapirent/following{/other_user}","gists_url":"https://api.github.com/users/rapirent/gists{/gist_id}","starred_url":"https://api.github.com/users/rapirent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rapirent/subscriptions","organizations_url":"https://api.github.com/users/rapirent/orgs","repos_url":"https://api.github.com/users/rapirent/repos","events_url":"https://api.github.com/users/rapirent/events{/privacy}","received_events_url":"https://api.github.com/users/rapirent/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rapirent/smart_campus","description":null,"fork":false,"url":"https://api.github.com/repos/rapirent/smart_campus","forks_url":"https://api.github.com/repos/rapirent/smart_campus/forks","keys_url":"https://api.github.com/repos/rapirent/smart_campus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rapirent/smart_campus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rapirent/smart_campus/teams","hooks_url":"https://api.github.com/repos/rapirent/smart_campus/hooks","issue_events_url":"https://api.github.com/repos/rapirent/smart_campus/issues/events{/number}","events_url":"https://api.github.com/repos/rapirent/smart_campus/events","assignees_url":"https://api.github.com/repos/rapirent/smart_campus/assignees{/user}","branches_url":"https://api.github.com/repos/rapirent/smart_campus/branches{/branch}","tags_url":"https://api.github.com/repos/rapirent/smart_campus/tags","blobs_url":"https://api.github.com/repos/rapirent/smart_campus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rapirent/smart_campus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rapirent/smart_campus/git/refs{/sha}","trees_url":"https://api.github.com/repos/rapirent/smart_campus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rapirent/smart_campus/statuses/{sha}","languages_url":"https://api.github.com/repos/rapirent/smart_campus/languages","stargazers_url":"https://api.github.com/repos/rapirent/smart_campus/stargazers","contributors_url":"https://api.github.com/repos/rapirent/smart_campus/contributors","subscribers_url":"https://api.github.com/repos/rapirent/smart_campus/subscribers","subscription_url":"https://api.github.com/repos/rapirent/smart_campus/subscription","commits_url":"https://api.github.com/repos/rapirent/smart_campus/commits{/sha}","git_commits_url":"https://api.github.com/repos/rapirent/smart_campus/git/commits{/sha}","comments_url":"https://api.github.com/repos/rapirent/smart_campus/comments{/number}","issue_comment_url":"https://api.github.com/repos/rapirent/smart_campus/issues/comments{/number}","contents_url":"https://api.github.com/repos/rapirent/smart_campus/contents/{+path}","compare_url":"https://api.github.com/repos/rapirent/smart_campus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rapirent/smart_campus/merges","archive_url":"https://api.github.com/repos/rapirent/smart_campus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rapirent/smart_campus/downloads","issues_url":"https://api.github.com/repos/rapirent/smart_campus/issues{/number}","pulls_url":"https://api.github.com/repos/rapirent/smart_campus/pulls{/number}","milestones_url":"https://api.github.com/repos/rapirent/smart_campus/milestones{/number}","notifications_url":"https://api.github.com/repos/rapirent/smart_campus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rapirent/smart_campus/labels{/name}","releases_url":"https://api.github.com/repos/rapirent/smart_campus/releases{/id}","deployments_url":"https://api.github.com/repos/rapirent/smart_campus/deployments","created_at":"2017-08-07T09:41:08Z","updated_at":"2017-08-28T11:36:56Z","pushed_at":"2017-09-22T09:13:56Z","git_url":"git://github.com/rapirent/smart_campus.git","ssh_url":"git@github.com:rapirent/smart_campus.git","clone_url":"https://github.com/rapirent/smart_campus.git","svn_url":"https://github.com/rapirent/smart_campus","homepage":null,"size":5675,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/rapirent/smart_campus/pulls/13"},"html":{"href":"https://github.com/rapirent/smart_campus/pull/13"},"issue":{"href":"https://api.github.com/repos/rapirent/smart_campus/issues/13"},"comments":{"href":"https://api.github.com/repos/rapirent/smart_campus/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/rapirent/smart_campus/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/rapirent/smart_campus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rapirent/smart_campus/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/rapirent/smart_campus/statuses/f0669427bf258f850d18b3ccaf0c354d324337fd"}},"author_association":"OWNER"}}
{"actor":{"display_login":"Lee-W"}}