{"action":"created","comment":{"url":"https://api.github.com/repos/swcarpentry/amy/pulls/comments/23217613","id":23217613,"diff_hunk":"@@ -145,51 +148,201 @@ def person_bulk_add(request):\n         form = PersonBulkAddForm(request.POST, request.FILES)\n         if form.is_valid():\n             try:\n-                persons_tasks = _upload_person_task_csv(request, request.FILES['file'])\n+                persons_tasks = _upload_person_task_csv(request,\n+                                                        request.FILES['file'])\n             except csv.Error as e:\n-                messages.add_message(request, messages.ERROR, \"Error processing uploaded .CSV file: {}\".format(e))\n+                messages.add_message(request, messages.ERROR,\n+                                     \"Error processing uploaded .CSV file: {}\"\n+                                     .format(e))\n             else:\n-                for entry in persons_tasks:\n-                    entry['person'].save()\n-                    if entry['task']:\n-                        entry['task'].person = entry['person'] # Because Django's ORM doesn't do this automatically.\n-                        entry['task'].save()\n-                context = {'title' : 'Process CSV File',\n-                           'form': form, \n-                           'persons_tasks': persons_tasks}\n-                return render(request, 'workshops/person_bulk_add_results.html', context)\n+                # instead of insta-saving, put everything into session\n+                # then redirect to confirmation page which in turn saves the\n+                # data\n+\n+                request.session['bulk-add-people'] = persons_tasks","path":"workshops/views.py","position":36,"original_position":36,"commit_id":"bb0a940167c842b9ecc8ad074335a42508451451","original_commit_id":"bb0a940167c842b9ecc8ad074335a42508451451","user":{"login":"sburns","id":440820,"avatar_url":"https://avatars.githubusercontent.com/u/440820?v=3","gravatar_id":"","url":"https://api.github.com/users/sburns","html_url":"https://github.com/sburns","followers_url":"https://api.github.com/users/sburns/followers","following_url":"https://api.github.com/users/sburns/following{/other_user}","gists_url":"https://api.github.com/users/sburns/gists{/gist_id}","starred_url":"https://api.github.com/users/sburns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sburns/subscriptions","organizations_url":"https://api.github.com/users/sburns/orgs","repos_url":"https://api.github.com/users/sburns/repos","events_url":"https://api.github.com/users/sburns/events{/privacy}","received_events_url":"https://api.github.com/users/sburns/received_events","type":"User","site_admin":false},"body":"Probably doesn't matter, but django's session serializer moved from pickle to json so we've got to make sure that if  in the future we add columns to the csv, the values will still be json-serializable. I'm probably just being paranoid though :) ","created_at":"2015-01-20T12:06:38Z","updated_at":"2015-01-20T12:06:38Z","html_url":"https://github.com/swcarpentry/amy/pull/139#discussion_r23217613","pull_request_url":"https://api.github.com/repos/swcarpentry/amy/pulls/139","_links":{"self":{"href":"https://api.github.com/repos/swcarpentry/amy/pulls/comments/23217613"},"html":{"href":"https://github.com/swcarpentry/amy/pull/139#discussion_r23217613"},"pull_request":{"href":"https://api.github.com/repos/swcarpentry/amy/pulls/139"}}},"pull_request":{"url":"https://api.github.com/repos/swcarpentry/amy/pulls/139","id":27343683,"html_url":"https://github.com/swcarpentry/amy/pull/139","diff_url":"https://github.com/swcarpentry/amy/pull/139.diff","patch_url":"https://github.com/swcarpentry/amy/pull/139.patch","issue_url":"https://api.github.com/repos/swcarpentry/amy/issues/139","number":139,"state":"open","locked":false,"title":"Bulk people CSV upload confirmation page","user":{"login":"pbanaszkiewicz","id":72821,"avatar_url":"https://avatars.githubusercontent.com/u/72821?v=3","gravatar_id":"","url":"https://api.github.com/users/pbanaszkiewicz","html_url":"https://github.com/pbanaszkiewicz","followers_url":"https://api.github.com/users/pbanaszkiewicz/followers","following_url":"https://api.github.com/users/pbanaszkiewicz/following{/other_user}","gists_url":"https://api.github.com/users/pbanaszkiewicz/gists{/gist_id}","starred_url":"https://api.github.com/users/pbanaszkiewicz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbanaszkiewicz/subscriptions","organizations_url":"https://api.github.com/users/pbanaszkiewicz/orgs","repos_url":"https://api.github.com/users/pbanaszkiewicz/repos","events_url":"https://api.github.com/users/pbanaszkiewicz/events{/privacy}","received_events_url":"https://api.github.com/users/pbanaszkiewicz/received_events","type":"User","site_admin":false},"body":"This PR is a solution to #138.\r\n\r\nWork-in-progress.","created_at":"2015-01-14T11:37:14Z","updated_at":"2015-01-20T12:06:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e16f431042e2ac525f0cb889192fbea5881ca4ef","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/swcarpentry/amy/pulls/139/commits","review_comments_url":"https://api.github.com/repos/swcarpentry/amy/pulls/139/comments","review_comment_url":"https://api.github.com/repos/swcarpentry/amy/pulls/comments/{number}","comments_url":"https://api.github.com/repos/swcarpentry/amy/issues/139/comments","statuses_url":"https://api.github.com/repos/swcarpentry/amy/statuses/bb0a940167c842b9ecc8ad074335a42508451451","head":{"label":"pbanaszkiewicz:bulk-upload-enhancement","ref":"bulk-upload-enhancement","sha":"bb0a940167c842b9ecc8ad074335a42508451451","user":{"login":"pbanaszkiewicz","id":72821,"avatar_url":"https://avatars.githubusercontent.com/u/72821?v=3","gravatar_id":"","url":"https://api.github.com/users/pbanaszkiewicz","html_url":"https://github.com/pbanaszkiewicz","followers_url":"https://api.github.com/users/pbanaszkiewicz/followers","following_url":"https://api.github.com/users/pbanaszkiewicz/following{/other_user}","gists_url":"https://api.github.com/users/pbanaszkiewicz/gists{/gist_id}","starred_url":"https://api.github.com/users/pbanaszkiewicz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbanaszkiewicz/subscriptions","organizations_url":"https://api.github.com/users/pbanaszkiewicz/orgs","repos_url":"https://api.github.com/users/pbanaszkiewicz/repos","events_url":"https://api.github.com/users/pbanaszkiewicz/events{/privacy}","received_events_url":"https://api.github.com/users/pbanaszkiewicz/received_events","type":"User","site_admin":false},"repo":{"id":28005098,"name":"amy","full_name":"pbanaszkiewicz/amy","owner":{"login":"pbanaszkiewicz","id":72821,"avatar_url":"https://avatars.githubusercontent.com/u/72821?v=3","gravatar_id":"","url":"https://api.github.com/users/pbanaszkiewicz","html_url":"https://github.com/pbanaszkiewicz","followers_url":"https://api.github.com/users/pbanaszkiewicz/followers","following_url":"https://api.github.com/users/pbanaszkiewicz/following{/other_user}","gists_url":"https://api.github.com/users/pbanaszkiewicz/gists{/gist_id}","starred_url":"https://api.github.com/users/pbanaszkiewicz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbanaszkiewicz/subscriptions","organizations_url":"https://api.github.com/users/pbanaszkiewicz/orgs","repos_url":"https://api.github.com/users/pbanaszkiewicz/repos","events_url":"https://api.github.com/users/pbanaszkiewicz/events{/privacy}","received_events_url":"https://api.github.com/users/pbanaszkiewicz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pbanaszkiewicz/amy","description":"A web-based workshop administration application built using Django.","fork":true,"url":"https://api.github.com/repos/pbanaszkiewicz/amy","forks_url":"https://api.github.com/repos/pbanaszkiewicz/amy/forks","keys_url":"https://api.github.com/repos/pbanaszkiewicz/amy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pbanaszkiewicz/amy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pbanaszkiewicz/amy/teams","hooks_url":"https://api.github.com/repos/pbanaszkiewicz/amy/hooks","issue_events_url":"https://api.github.com/repos/pbanaszkiewicz/amy/issues/events{/number}","events_url":"https://api.github.com/repos/pbanaszkiewicz/amy/events","assignees_url":"https://api.github.com/repos/pbanaszkiewicz/amy/assignees{/user}","branches_url":"https://api.github.com/repos/pbanaszkiewicz/amy/branches{/branch}","tags_url":"https://api.github.com/repos/pbanaszkiewicz/amy/tags","blobs_url":"https://api.github.com/repos/pbanaszkiewicz/amy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pbanaszkiewicz/amy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pbanaszkiewicz/amy/git/refs{/sha}","trees_url":"https://api.github.com/repos/pbanaszkiewicz/amy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pbanaszkiewicz/amy/statuses/{sha}","languages_url":"https://api.github.com/repos/pbanaszkiewicz/amy/languages","stargazers_url":"https://api.github.com/repos/pbanaszkiewicz/amy/stargazers","contributors_url":"https://api.github.com/repos/pbanaszkiewicz/amy/contributors","subscribers_url":"https://api.github.com/repos/pbanaszkiewicz/amy/subscribers","subscription_url":"https://api.github.com/repos/pbanaszkiewicz/amy/subscription","commits_url":"https://api.github.com/repos/pbanaszkiewicz/amy/commits{/sha}","git_commits_url":"https://api.github.com/repos/pbanaszkiewicz/amy/git/commits{/sha}","comments_url":"https://api.github.com/repos/pbanaszkiewicz/amy/comments{/number}","issue_comment_url":"https://api.github.com/repos/pbanaszkiewicz/amy/issues/comments/{number}","contents_url":"https://api.github.com/repos/pbanaszkiewicz/amy/contents/{+path}","compare_url":"https://api.github.com/repos/pbanaszkiewicz/amy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pbanaszkiewicz/amy/merges","archive_url":"https://api.github.com/repos/pbanaszkiewicz/amy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pbanaszkiewicz/amy/downloads","issues_url":"https://api.github.com/repos/pbanaszkiewicz/amy/issues{/number}","pulls_url":"https://api.github.com/repos/pbanaszkiewicz/amy/pulls{/number}","milestones_url":"https://api.github.com/repos/pbanaszkiewicz/amy/milestones{/number}","notifications_url":"https://api.github.com/repos/pbanaszkiewicz/amy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pbanaszkiewicz/amy/labels{/name}","releases_url":"https://api.github.com/repos/pbanaszkiewicz/amy/releases{/id}","created_at":"2014-12-14T19:25:22Z","updated_at":"2015-01-18T20:26:41Z","pushed_at":"2015-01-18T20:26:38Z","git_url":"git://github.com/pbanaszkiewicz/amy.git","ssh_url":"git@github.com:pbanaszkiewicz/amy.git","clone_url":"https://github.com/pbanaszkiewicz/amy.git","svn_url":"https://github.com/pbanaszkiewicz/amy","homepage":null,"size":4154,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"swcarpentry:master","ref":"master","sha":"7eaa1031b32a2c1a2d25f730a89e23ac14ef45dc","user":{"login":"swcarpentry","id":2238358,"avatar_url":"https://avatars.githubusercontent.com/u/2238358?v=3","gravatar_id":"","url":"https://api.github.com/users/swcarpentry","html_url":"https://github.com/swcarpentry","followers_url":"https://api.github.com/users/swcarpentry/followers","following_url":"https://api.github.com/users/swcarpentry/following{/other_user}","gists_url":"https://api.github.com/users/swcarpentry/gists{/gist_id}","starred_url":"https://api.github.com/users/swcarpentry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swcarpentry/subscriptions","organizations_url":"https://api.github.com/users/swcarpentry/orgs","repos_url":"https://api.github.com/users/swcarpentry/repos","events_url":"https://api.github.com/users/swcarpentry/events{/privacy}","received_events_url":"https://api.github.com/users/swcarpentry/received_events","type":"Organization","site_admin":false},"repo":{"id":27387287,"name":"amy","full_name":"swcarpentry/amy","owner":{"login":"swcarpentry","id":2238358,"avatar_url":"https://avatars.githubusercontent.com/u/2238358?v=3","gravatar_id":"","url":"https://api.github.com/users/swcarpentry","html_url":"https://github.com/swcarpentry","followers_url":"https://api.github.com/users/swcarpentry/followers","following_url":"https://api.github.com/users/swcarpentry/following{/other_user}","gists_url":"https://api.github.com/users/swcarpentry/gists{/gist_id}","starred_url":"https://api.github.com/users/swcarpentry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swcarpentry/subscriptions","organizations_url":"https://api.github.com/users/swcarpentry/orgs","repos_url":"https://api.github.com/users/swcarpentry/repos","events_url":"https://api.github.com/users/swcarpentry/events{/privacy}","received_events_url":"https://api.github.com/users/swcarpentry/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/swcarpentry/amy","description":"A web-based workshop administration application built using Django.","fork":false,"url":"https://api.github.com/repos/swcarpentry/amy","forks_url":"https://api.github.com/repos/swcarpentry/amy/forks","keys_url":"https://api.github.com/repos/swcarpentry/amy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/swcarpentry/amy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/swcarpentry/amy/teams","hooks_url":"https://api.github.com/repos/swcarpentry/amy/hooks","issue_events_url":"https://api.github.com/repos/swcarpentry/amy/issues/events{/number}","events_url":"https://api.github.com/repos/swcarpentry/amy/events","assignees_url":"https://api.github.com/repos/swcarpentry/amy/assignees{/user}","branches_url":"https://api.github.com/repos/swcarpentry/amy/branches{/branch}","tags_url":"https://api.github.com/repos/swcarpentry/amy/tags","blobs_url":"https://api.github.com/repos/swcarpentry/amy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/swcarpentry/amy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/swcarpentry/amy/git/refs{/sha}","trees_url":"https://api.github.com/repos/swcarpentry/amy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/swcarpentry/amy/statuses/{sha}","languages_url":"https://api.github.com/repos/swcarpentry/amy/languages","stargazers_url":"https://api.github.com/repos/swcarpentry/amy/stargazers","contributors_url":"https://api.github.com/repos/swcarpentry/amy/contributors","subscribers_url":"https://api.github.com/repos/swcarpentry/amy/subscribers","subscription_url":"https://api.github.com/repos/swcarpentry/amy/subscription","commits_url":"https://api.github.com/repos/swcarpentry/amy/commits{/sha}","git_commits_url":"https://api.github.com/repos/swcarpentry/amy/git/commits{/sha}","comments_url":"https://api.github.com/repos/swcarpentry/amy/comments{/number}","issue_comment_url":"https://api.github.com/repos/swcarpentry/amy/issues/comments/{number}","contents_url":"https://api.github.com/repos/swcarpentry/amy/contents/{+path}","compare_url":"https://api.github.com/repos/swcarpentry/amy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/swcarpentry/amy/merges","archive_url":"https://api.github.com/repos/swcarpentry/amy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/swcarpentry/amy/downloads","issues_url":"https://api.github.com/repos/swcarpentry/amy/issues{/number}","pulls_url":"https://api.github.com/repos/swcarpentry/amy/pulls{/number}","milestones_url":"https://api.github.com/repos/swcarpentry/amy/milestones{/number}","notifications_url":"https://api.github.com/repos/swcarpentry/amy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/swcarpentry/amy/labels{/name}","releases_url":"https://api.github.com/repos/swcarpentry/amy/releases{/id}","created_at":"2014-12-01T16:07:14Z","updated_at":"2015-01-18T23:17:47Z","pushed_at":"2015-01-18T23:17:47Z","git_url":"git://github.com/swcarpentry/amy.git","ssh_url":"git@github.com:swcarpentry/amy.git","clone_url":"https://github.com/swcarpentry/amy.git","svn_url":"https://github.com/swcarpentry/amy","homepage":null,"size":6217,"stargazers_count":7,"watchers_count":7,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":45,"forks":21,"open_issues":45,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/swcarpentry/amy/pulls/139"},"html":{"href":"https://github.com/swcarpentry/amy/pull/139"},"issue":{"href":"https://api.github.com/repos/swcarpentry/amy/issues/139"},"comments":{"href":"https://api.github.com/repos/swcarpentry/amy/issues/139/comments"},"review_comments":{"href":"https://api.github.com/repos/swcarpentry/amy/pulls/139/comments"},"review_comment":{"href":"https://api.github.com/repos/swcarpentry/amy/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/swcarpentry/amy/pulls/139/commits"},"statuses":{"href":"https://api.github.com/repos/swcarpentry/amy/statuses/bb0a940167c842b9ecc8ad074335a42508451451"}}}}