{"action":"created","comment":{"url":"https://api.github.com/repos/lhalam/event_manager/pulls/comments/85186819","pull_request_review_id":5916439,"id":85186819,"diff_hunk":"@@ -1,3 +1,56 @@\n-from django.shortcuts import render\n+import json\n \n-# Create your views here.\n+from django.http import JsonResponse\n+from django.views.generic.base import View\n+\n+from .models import Event, EventUserAssignment, User\n+\n+\n+class EventView(View):\n+\n+    pass\n+\n+\n+class EventUserAssignmentView(View):\n+    \"\"\"\n+    View used for user assignment to event.\n+    \"\"\"\n+\n+    def put(self, request, event_id):\n+        \"\"\"\n+        :param request: request to View\n+        :param event_id: id of event for which users will be assigned\n+        :return: json containing error message and status 404 if event does not exists.\n+        json containing two lists: successfully added users; users which do not exist and status 404\n+        if some of assigned users are not existing.\n+        json containing list of successfully added users and status 200.\n+        \"\"\"\n+        data = json.loads(request.body.decode())\n+        not_existing_users, successfully_added = [], []","path":"events/event/views.py","position":31,"original_position":31,"commit_id":"3decc5c514885a7a84146c13b3e3281733b19651","original_commit_id":"3decc5c514885a7a84146c13b3e3281733b19651","user":{"login":"VKotsovskyi","id":2905488,"avatar_url":"https://avatars.githubusercontent.com/u/2905488?v=3","gravatar_id":"","url":"https://api.github.com/users/VKotsovskyi","html_url":"https://github.com/VKotsovskyi","followers_url":"https://api.github.com/users/VKotsovskyi/followers","following_url":"https://api.github.com/users/VKotsovskyi/following{/other_user}","gists_url":"https://api.github.com/users/VKotsovskyi/gists{/gist_id}","starred_url":"https://api.github.com/users/VKotsovskyi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VKotsovskyi/subscriptions","organizations_url":"https://api.github.com/users/VKotsovskyi/orgs","repos_url":"https://api.github.com/users/VKotsovskyi/repos","events_url":"https://api.github.com/users/VKotsovskyi/events{/privacy}","received_events_url":"https://api.github.com/users/VKotsovskyi/received_events","type":"User","site_admin":false},"body":"this works slower than one by one assignment.","created_at":"2016-10-26T18:18:16Z","updated_at":"2016-10-26T18:40:33Z","html_url":"https://github.com/lhalam/event_manager/pull/4#discussion_r85186819","pull_request_url":"https://api.github.com/repos/lhalam/event_manager/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/lhalam/event_manager/pulls/comments/85186819"},"html":{"href":"https://github.com/lhalam/event_manager/pull/4#discussion_r85186819"},"pull_request":{"href":"https://api.github.com/repos/lhalam/event_manager/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/lhalam/event_manager/pulls/4","id":90868846,"html_url":"https://github.com/lhalam/event_manager/pull/4","diff_url":"https://github.com/lhalam/event_manager/pull/4.diff","patch_url":"https://github.com/lhalam/event_manager/pull/4.patch","issue_url":"https://api.github.com/repos/lhalam/event_manager/issues/4","number":4,"state":"open","locked":false,"title":"Event api participants","user":{"login":"Scandie","id":4282281,"avatar_url":"https://avatars.githubusercontent.com/u/4282281?v=3","gravatar_id":"","url":"https://api.github.com/users/Scandie","html_url":"https://github.com/Scandie","followers_url":"https://api.github.com/users/Scandie/followers","following_url":"https://api.github.com/users/Scandie/following{/other_user}","gists_url":"https://api.github.com/users/Scandie/gists{/gist_id}","starred_url":"https://api.github.com/users/Scandie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Scandie/subscriptions","organizations_url":"https://api.github.com/users/Scandie/orgs","repos_url":"https://api.github.com/users/Scandie/repos","events_url":"https://api.github.com/users/Scandie/events{/privacy}","received_events_url":"https://api.github.com/users/Scandie/received_events","type":"User","site_admin":false},"body":"Realization of API for user assignment to event.","created_at":"2016-10-25T18:52:08Z","updated_at":"2016-10-26T18:40:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b9b57072d50db9002c73dae9927d089e71e11481","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/lhalam/event_manager/pulls/4/commits","review_comments_url":"https://api.github.com/repos/lhalam/event_manager/pulls/4/comments","review_comment_url":"https://api.github.com/repos/lhalam/event_manager/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lhalam/event_manager/issues/4/comments","statuses_url":"https://api.github.com/repos/lhalam/event_manager/statuses/3decc5c514885a7a84146c13b3e3281733b19651","head":{"label":"lhalam:event_api_participants","ref":"event_api_participants","sha":"3decc5c514885a7a84146c13b3e3281733b19651","user":{"login":"lhalam","id":3837059,"avatar_url":"https://avatars.githubusercontent.com/u/3837059?v=3","gravatar_id":"","url":"https://api.github.com/users/lhalam","html_url":"https://github.com/lhalam","followers_url":"https://api.github.com/users/lhalam/followers","following_url":"https://api.github.com/users/lhalam/following{/other_user}","gists_url":"https://api.github.com/users/lhalam/gists{/gist_id}","starred_url":"https://api.github.com/users/lhalam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lhalam/subscriptions","organizations_url":"https://api.github.com/users/lhalam/orgs","repos_url":"https://api.github.com/users/lhalam/repos","events_url":"https://api.github.com/users/lhalam/events{/privacy}","received_events_url":"https://api.github.com/users/lhalam/received_events","type":"User","site_admin":false},"repo":{"id":71260068,"name":"event_manager","full_name":"lhalam/event_manager","owner":{"login":"lhalam","id":3837059,"avatar_url":"https://avatars.githubusercontent.com/u/3837059?v=3","gravatar_id":"","url":"https://api.github.com/users/lhalam","html_url":"https://github.com/lhalam","followers_url":"https://api.github.com/users/lhalam/followers","following_url":"https://api.github.com/users/lhalam/following{/other_user}","gists_url":"https://api.github.com/users/lhalam/gists{/gist_id}","starred_url":"https://api.github.com/users/lhalam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lhalam/subscriptions","organizations_url":"https://api.github.com/users/lhalam/orgs","repos_url":"https://api.github.com/users/lhalam/repos","events_url":"https://api.github.com/users/lhalam/events{/privacy}","received_events_url":"https://api.github.com/users/lhalam/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lhalam/event_manager","description":null,"fork":false,"url":"https://api.github.com/repos/lhalam/event_manager","forks_url":"https://api.github.com/repos/lhalam/event_manager/forks","keys_url":"https://api.github.com/repos/lhalam/event_manager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lhalam/event_manager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lhalam/event_manager/teams","hooks_url":"https://api.github.com/repos/lhalam/event_manager/hooks","issue_events_url":"https://api.github.com/repos/lhalam/event_manager/issues/events{/number}","events_url":"https://api.github.com/repos/lhalam/event_manager/events","assignees_url":"https://api.github.com/repos/lhalam/event_manager/assignees{/user}","branches_url":"https://api.github.com/repos/lhalam/event_manager/branches{/branch}","tags_url":"https://api.github.com/repos/lhalam/event_manager/tags","blobs_url":"https://api.github.com/repos/lhalam/event_manager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lhalam/event_manager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lhalam/event_manager/git/refs{/sha}","trees_url":"https://api.github.com/repos/lhalam/event_manager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lhalam/event_manager/statuses/{sha}","languages_url":"https://api.github.com/repos/lhalam/event_manager/languages","stargazers_url":"https://api.github.com/repos/lhalam/event_manager/stargazers","contributors_url":"https://api.github.com/repos/lhalam/event_manager/contributors","subscribers_url":"https://api.github.com/repos/lhalam/event_manager/subscribers","subscription_url":"https://api.github.com/repos/lhalam/event_manager/subscription","commits_url":"https://api.github.com/repos/lhalam/event_manager/commits{/sha}","git_commits_url":"https://api.github.com/repos/lhalam/event_manager/git/commits{/sha}","comments_url":"https://api.github.com/repos/lhalam/event_manager/comments{/number}","issue_comment_url":"https://api.github.com/repos/lhalam/event_manager/issues/comments{/number}","contents_url":"https://api.github.com/repos/lhalam/event_manager/contents/{+path}","compare_url":"https://api.github.com/repos/lhalam/event_manager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lhalam/event_manager/merges","archive_url":"https://api.github.com/repos/lhalam/event_manager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lhalam/event_manager/downloads","issues_url":"https://api.github.com/repos/lhalam/event_manager/issues{/number}","pulls_url":"https://api.github.com/repos/lhalam/event_manager/pulls{/number}","milestones_url":"https://api.github.com/repos/lhalam/event_manager/milestones{/number}","notifications_url":"https://api.github.com/repos/lhalam/event_manager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lhalam/event_manager/labels{/name}","releases_url":"https://api.github.com/repos/lhalam/event_manager/releases{/id}","deployments_url":"https://api.github.com/repos/lhalam/event_manager/deployments","created_at":"2016-10-18T15:01:24Z","updated_at":"2016-10-19T06:14:40Z","pushed_at":"2016-10-26T11:15:29Z","git_url":"git://github.com/lhalam/event_manager.git","ssh_url":"git@github.com:lhalam/event_manager.git","clone_url":"https://github.com/lhalam/event_manager.git","svn_url":"https://github.com/lhalam/event_manager","homepage":null,"size":600,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"base":{"label":"lhalam:dev","ref":"dev","sha":"ac5eedb0b476c13d6384ee30815a270eea8d697f","user":{"login":"lhalam","id":3837059,"avatar_url":"https://avatars.githubusercontent.com/u/3837059?v=3","gravatar_id":"","url":"https://api.github.com/users/lhalam","html_url":"https://github.com/lhalam","followers_url":"https://api.github.com/users/lhalam/followers","following_url":"https://api.github.com/users/lhalam/following{/other_user}","gists_url":"https://api.github.com/users/lhalam/gists{/gist_id}","starred_url":"https://api.github.com/users/lhalam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lhalam/subscriptions","organizations_url":"https://api.github.com/users/lhalam/orgs","repos_url":"https://api.github.com/users/lhalam/repos","events_url":"https://api.github.com/users/lhalam/events{/privacy}","received_events_url":"https://api.github.com/users/lhalam/received_events","type":"User","site_admin":false},"repo":{"id":71260068,"name":"event_manager","full_name":"lhalam/event_manager","owner":{"login":"lhalam","id":3837059,"avatar_url":"https://avatars.githubusercontent.com/u/3837059?v=3","gravatar_id":"","url":"https://api.github.com/users/lhalam","html_url":"https://github.com/lhalam","followers_url":"https://api.github.com/users/lhalam/followers","following_url":"https://api.github.com/users/lhalam/following{/other_user}","gists_url":"https://api.github.com/users/lhalam/gists{/gist_id}","starred_url":"https://api.github.com/users/lhalam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lhalam/subscriptions","organizations_url":"https://api.github.com/users/lhalam/orgs","repos_url":"https://api.github.com/users/lhalam/repos","events_url":"https://api.github.com/users/lhalam/events{/privacy}","received_events_url":"https://api.github.com/users/lhalam/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lhalam/event_manager","description":null,"fork":false,"url":"https://api.github.com/repos/lhalam/event_manager","forks_url":"https://api.github.com/repos/lhalam/event_manager/forks","keys_url":"https://api.github.com/repos/lhalam/event_manager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lhalam/event_manager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lhalam/event_manager/teams","hooks_url":"https://api.github.com/repos/lhalam/event_manager/hooks","issue_events_url":"https://api.github.com/repos/lhalam/event_manager/issues/events{/number}","events_url":"https://api.github.com/repos/lhalam/event_manager/events","assignees_url":"https://api.github.com/repos/lhalam/event_manager/assignees{/user}","branches_url":"https://api.github.com/repos/lhalam/event_manager/branches{/branch}","tags_url":"https://api.github.com/repos/lhalam/event_manager/tags","blobs_url":"https://api.github.com/repos/lhalam/event_manager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lhalam/event_manager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lhalam/event_manager/git/refs{/sha}","trees_url":"https://api.github.com/repos/lhalam/event_manager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lhalam/event_manager/statuses/{sha}","languages_url":"https://api.github.com/repos/lhalam/event_manager/languages","stargazers_url":"https://api.github.com/repos/lhalam/event_manager/stargazers","contributors_url":"https://api.github.com/repos/lhalam/event_manager/contributors","subscribers_url":"https://api.github.com/repos/lhalam/event_manager/subscribers","subscription_url":"https://api.github.com/repos/lhalam/event_manager/subscription","commits_url":"https://api.github.com/repos/lhalam/event_manager/commits{/sha}","git_commits_url":"https://api.github.com/repos/lhalam/event_manager/git/commits{/sha}","comments_url":"https://api.github.com/repos/lhalam/event_manager/comments{/number}","issue_comment_url":"https://api.github.com/repos/lhalam/event_manager/issues/comments{/number}","contents_url":"https://api.github.com/repos/lhalam/event_manager/contents/{+path}","compare_url":"https://api.github.com/repos/lhalam/event_manager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lhalam/event_manager/merges","archive_url":"https://api.github.com/repos/lhalam/event_manager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lhalam/event_manager/downloads","issues_url":"https://api.github.com/repos/lhalam/event_manager/issues{/number}","pulls_url":"https://api.github.com/repos/lhalam/event_manager/pulls{/number}","milestones_url":"https://api.github.com/repos/lhalam/event_manager/milestones{/number}","notifications_url":"https://api.github.com/repos/lhalam/event_manager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lhalam/event_manager/labels{/name}","releases_url":"https://api.github.com/repos/lhalam/event_manager/releases{/id}","deployments_url":"https://api.github.com/repos/lhalam/event_manager/deployments","created_at":"2016-10-18T15:01:24Z","updated_at":"2016-10-19T06:14:40Z","pushed_at":"2016-10-26T11:15:29Z","git_url":"git://github.com/lhalam/event_manager.git","ssh_url":"git@github.com:lhalam/event_manager.git","clone_url":"https://github.com/lhalam/event_manager.git","svn_url":"https://github.com/lhalam/event_manager","homepage":null,"size":600,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lhalam/event_manager/pulls/4"},"html":{"href":"https://github.com/lhalam/event_manager/pull/4"},"issue":{"href":"https://api.github.com/repos/lhalam/event_manager/issues/4"},"comments":{"href":"https://api.github.com/repos/lhalam/event_manager/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/lhalam/event_manager/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/lhalam/event_manager/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lhalam/event_manager/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/lhalam/event_manager/statuses/3decc5c514885a7a84146c13b3e3281733b19651"}}}}
{"actor":{"display_login":"VKotsovskyi"}}