{"action":"created","comment":{"url":"https://api.github.com/repos/docsocsf/mad/pulls/comments/127609294","pull_request_review_id":50213334,"id":127609294,"diff_hunk":"@@ -15,29 +18,49 @@ def __str__(self):\n \n \n class Student(models.Model):\n-    username = models.CharField(max_length=7,unique=True)\n+    GENDER_CHOICES = (\n+        ('M', 'Male'),\n+        ('F', 'Female'),\n+    )\n+\n+    COURSE_CHOICES = (\n+        ('C', 'Computing'),\n+        ('J', 'JMC')\n+    )\n+\n+    name = models.CharField(max_length=100)\n+    username = models.CharField(max_length=7, unique=True)\n+    gender = models.CharField(max_length=1, choices=GENDER_CHOICES)\n+    course = models.CharField(max_length=1, choices=COURSE_CHOICES)\n     magic_id = models.CharField(max_length=8)\n     child = models.BooleanField()\n     party = models.BooleanField(default=False)\n     hobbies = models.ManyToManyField(to=Hobby, blank=True)\n     partner = models.ForeignKey('Student', null=True, blank=True)\n     family = models.ForeignKey('Family', null=True, blank=True)\n     confirmed = models.BooleanField(default=False)\n+    activated = models.BooleanField(default=False)\n \n     def __str__(self):\n-        return self.username\n+        return self.name\n \n     def save(self, *args, **kwargs):\n         if not self.magic_id or len(self.magic_id) == 0:\n             self.magic_id = get_random_id()\n         super(Student, self).save(*args, **kwargs)\n \n     def get_new_student_popup(self):\n-        message = \"Email has been sent to %s@ic.ac.uk. Go activate your account.\" % self.username\n-        return {'message': message, 'state': 'success'}\n+        popup = \"Email has been sent to %s@ic.ac.uk. Go activate your account.\" % self.username\n+        message = \"To view the Mums and Dads portal go to %s/preferences/%s/\\n\\nKeep this URL safe, anyone with it \" \\","path":"portal/models.py","position":51,"original_position":51,"commit_id":"c9297aed5d2c3ac9ee4e952e22e7e5a8b3f44233","original_commit_id":"c9297aed5d2c3ac9ee4e952e22e7e5a8b3f44233","user":{"login":"levex","id":849140,"avatar_url":"https://avatars6.githubusercontent.com/u/849140?v=4","gravatar_id":"","url":"https://api.github.com/users/levex","html_url":"https://github.com/levex","followers_url":"https://api.github.com/users/levex/followers","following_url":"https://api.github.com/users/levex/following{/other_user}","gists_url":"https://api.github.com/users/levex/gists{/gist_id}","starred_url":"https://api.github.com/users/levex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/levex/subscriptions","organizations_url":"https://api.github.com/users/levex/orgs","repos_url":"https://api.github.com/users/levex/repos","events_url":"https://api.github.com/users/levex/events{/privacy}","received_events_url":"https://api.github.com/users/levex/received_events","type":"User","site_admin":false},"body":"Even in the previous review, I found “Go activate your account” a little passive aggressive, maybe “Please check your email to activate your account” would be better, imho.","created_at":"2017-07-16T15:21:30Z","updated_at":"2017-07-16T15:23:54Z","html_url":"https://github.com/docsocsf/mad/pull/28#discussion_r127609294","pull_request_url":"https://api.github.com/repos/docsocsf/mad/pulls/28","_links":{"self":{"href":"https://api.github.com/repos/docsocsf/mad/pulls/comments/127609294"},"html":{"href":"https://github.com/docsocsf/mad/pull/28#discussion_r127609294"},"pull_request":{"href":"https://api.github.com/repos/docsocsf/mad/pulls/28"}}},"pull_request":{"url":"https://api.github.com/repos/docsocsf/mad/pulls/28","id":130749551,"html_url":"https://github.com/docsocsf/mad/pull/28","diff_url":"https://github.com/docsocsf/mad/pull/28.diff","patch_url":"https://github.com/docsocsf/mad/pull/28.patch","issue_url":"https://api.github.com/repos/docsocsf/mad/issues/28","number":28,"state":"open","locked":false,"title":"Added functionality to allow parents to register","user":{"login":"martinzlocha","id":6172074,"avatar_url":"https://avatars6.githubusercontent.com/u/6172074?v=4","gravatar_id":"","url":"https://api.github.com/users/martinzlocha","html_url":"https://github.com/martinzlocha","followers_url":"https://api.github.com/users/martinzlocha/followers","following_url":"https://api.github.com/users/martinzlocha/following{/other_user}","gists_url":"https://api.github.com/users/martinzlocha/gists{/gist_id}","starred_url":"https://api.github.com/users/martinzlocha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinzlocha/subscriptions","organizations_url":"https://api.github.com/users/martinzlocha/orgs","repos_url":"https://api.github.com/users/martinzlocha/repos","events_url":"https://api.github.com/users/martinzlocha/events{/privacy}","received_events_url":"https://api.github.com/users/martinzlocha/received_events","type":"User","site_admin":false},"body":"<!--- Provide a general summary of your changes in the Title above -->\r\n\r\n## Description\r\n<!--- Describe your changes in detail -->\r\nGrouped up a few small features which are nescessary to deploy and allow\r\nparents to register.\r\n\r\nCloses #13, closes #15, closes #18 (Added close three times so that all three issues are closed automatically when this PR is merged)\r\nImplements (but do not close) #11\r\n\r\n## Motivation and Context\r\n<!--- Why is this change required? What problem does it solve? -->\r\n<!--- If it fixes an open issue, please link to the issue here. -->\r\nGiven that there is relatively little time till freshers get their results I felt it was necessary to implement the basic features so that parents can register. Tried to keep as many issues as possible open which are not needed to be solved at this stage.\r\n\r\n## How Has This Been Tested?\r\n<!--- Please describe in detail how you tested your changes. -->\r\n<!--- Include details of your testing environment, and the tests you ran to -->\r\n<!--- see how your change affects other areas of the code, etc. -->\r\nAdded new tests and run test.sh\r\n\r\n## Types of changes\r\n<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [x] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n\r\n## Checklist:\r\n<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->\r\n- [x] My code follows the code style of this project.\r\n- [ ] My change requires a change to the documentation.\r\n- [ ] I have updated the documentation accordingly.\r\n- [x] I have read the **README** document.\r\n- [x] I have added tests to cover my changes.\r\n- [x] All new and existing tests passed.\r\n","created_at":"2017-07-16T12:26:04Z","updated_at":"2017-07-16T15:23:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"45d5b1c015f98191209aa7bdd47bff6abde2c82b","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/docsocsf/mad/pulls/28/commits","review_comments_url":"https://api.github.com/repos/docsocsf/mad/pulls/28/comments","review_comment_url":"https://api.github.com/repos/docsocsf/mad/pulls/comments{/number}","comments_url":"https://api.github.com/repos/docsocsf/mad/issues/28/comments","statuses_url":"https://api.github.com/repos/docsocsf/mad/statuses/c9297aed5d2c3ac9ee4e952e22e7e5a8b3f44233","head":{"label":"martinzlocha:prep-for-deployment","ref":"prep-for-deployment","sha":"c9297aed5d2c3ac9ee4e952e22e7e5a8b3f44233","user":{"login":"martinzlocha","id":6172074,"avatar_url":"https://avatars6.githubusercontent.com/u/6172074?v=4","gravatar_id":"","url":"https://api.github.com/users/martinzlocha","html_url":"https://github.com/martinzlocha","followers_url":"https://api.github.com/users/martinzlocha/followers","following_url":"https://api.github.com/users/martinzlocha/following{/other_user}","gists_url":"https://api.github.com/users/martinzlocha/gists{/gist_id}","starred_url":"https://api.github.com/users/martinzlocha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinzlocha/subscriptions","organizations_url":"https://api.github.com/users/martinzlocha/orgs","repos_url":"https://api.github.com/users/martinzlocha/repos","events_url":"https://api.github.com/users/martinzlocha/events{/privacy}","received_events_url":"https://api.github.com/users/martinzlocha/received_events","type":"User","site_admin":false},"repo":{"id":95330990,"name":"mad","full_name":"martinzlocha/mad","owner":{"login":"martinzlocha","id":6172074,"avatar_url":"https://avatars6.githubusercontent.com/u/6172074?v=4","gravatar_id":"","url":"https://api.github.com/users/martinzlocha","html_url":"https://github.com/martinzlocha","followers_url":"https://api.github.com/users/martinzlocha/followers","following_url":"https://api.github.com/users/martinzlocha/following{/other_user}","gists_url":"https://api.github.com/users/martinzlocha/gists{/gist_id}","starred_url":"https://api.github.com/users/martinzlocha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinzlocha/subscriptions","organizations_url":"https://api.github.com/users/martinzlocha/orgs","repos_url":"https://api.github.com/users/martinzlocha/repos","events_url":"https://api.github.com/users/martinzlocha/events{/privacy}","received_events_url":"https://api.github.com/users/martinzlocha/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/martinzlocha/mad","description":"Mums and Dads Portal","fork":true,"url":"https://api.github.com/repos/martinzlocha/mad","forks_url":"https://api.github.com/repos/martinzlocha/mad/forks","keys_url":"https://api.github.com/repos/martinzlocha/mad/keys{/key_id}","collaborators_url":"https://api.github.com/repos/martinzlocha/mad/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/martinzlocha/mad/teams","hooks_url":"https://api.github.com/repos/martinzlocha/mad/hooks","issue_events_url":"https://api.github.com/repos/martinzlocha/mad/issues/events{/number}","events_url":"https://api.github.com/repos/martinzlocha/mad/events","assignees_url":"https://api.github.com/repos/martinzlocha/mad/assignees{/user}","branches_url":"https://api.github.com/repos/martinzlocha/mad/branches{/branch}","tags_url":"https://api.github.com/repos/martinzlocha/mad/tags","blobs_url":"https://api.github.com/repos/martinzlocha/mad/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/martinzlocha/mad/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/martinzlocha/mad/git/refs{/sha}","trees_url":"https://api.github.com/repos/martinzlocha/mad/git/trees{/sha}","statuses_url":"https://api.github.com/repos/martinzlocha/mad/statuses/{sha}","languages_url":"https://api.github.com/repos/martinzlocha/mad/languages","stargazers_url":"https://api.github.com/repos/martinzlocha/mad/stargazers","contributors_url":"https://api.github.com/repos/martinzlocha/mad/contributors","subscribers_url":"https://api.github.com/repos/martinzlocha/mad/subscribers","subscription_url":"https://api.github.com/repos/martinzlocha/mad/subscription","commits_url":"https://api.github.com/repos/martinzlocha/mad/commits{/sha}","git_commits_url":"https://api.github.com/repos/martinzlocha/mad/git/commits{/sha}","comments_url":"https://api.github.com/repos/martinzlocha/mad/comments{/number}","issue_comment_url":"https://api.github.com/repos/martinzlocha/mad/issues/comments{/number}","contents_url":"https://api.github.com/repos/martinzlocha/mad/contents/{+path}","compare_url":"https://api.github.com/repos/martinzlocha/mad/compare/{base}...{head}","merges_url":"https://api.github.com/repos/martinzlocha/mad/merges","archive_url":"https://api.github.com/repos/martinzlocha/mad/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/martinzlocha/mad/downloads","issues_url":"https://api.github.com/repos/martinzlocha/mad/issues{/number}","pulls_url":"https://api.github.com/repos/martinzlocha/mad/pulls{/number}","milestones_url":"https://api.github.com/repos/martinzlocha/mad/milestones{/number}","notifications_url":"https://api.github.com/repos/martinzlocha/mad/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/martinzlocha/mad/labels{/name}","releases_url":"https://api.github.com/repos/martinzlocha/mad/releases{/id}","deployments_url":"https://api.github.com/repos/martinzlocha/mad/deployments","created_at":"2017-06-25T01:07:22Z","updated_at":"2017-06-25T01:07:23Z","pushed_at":"2017-07-16T12:22:05Z","git_url":"git://github.com/martinzlocha/mad.git","ssh_url":"git@github.com:martinzlocha/mad.git","clone_url":"https://github.com/martinzlocha/mad.git","svn_url":"https://github.com/martinzlocha/mad","homepage":"","size":50,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"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":"docsocsf:master","ref":"master","sha":"c22e4ef443a2f6e5c265d1ea132f0e70d34c5cb4","user":{"login":"docsocsf","id":29506456,"avatar_url":"https://avatars5.githubusercontent.com/u/29506456?v=4","gravatar_id":"","url":"https://api.github.com/users/docsocsf","html_url":"https://github.com/docsocsf","followers_url":"https://api.github.com/users/docsocsf/followers","following_url":"https://api.github.com/users/docsocsf/following{/other_user}","gists_url":"https://api.github.com/users/docsocsf/gists{/gist_id}","starred_url":"https://api.github.com/users/docsocsf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docsocsf/subscriptions","organizations_url":"https://api.github.com/users/docsocsf/orgs","repos_url":"https://api.github.com/users/docsocsf/repos","events_url":"https://api.github.com/users/docsocsf/events{/privacy}","received_events_url":"https://api.github.com/users/docsocsf/received_events","type":"Organization","site_admin":false},"repo":{"id":94695887,"name":"mad","full_name":"docsocsf/mad","owner":{"login":"docsocsf","id":29506456,"avatar_url":"https://avatars5.githubusercontent.com/u/29506456?v=4","gravatar_id":"","url":"https://api.github.com/users/docsocsf","html_url":"https://github.com/docsocsf","followers_url":"https://api.github.com/users/docsocsf/followers","following_url":"https://api.github.com/users/docsocsf/following{/other_user}","gists_url":"https://api.github.com/users/docsocsf/gists{/gist_id}","starred_url":"https://api.github.com/users/docsocsf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docsocsf/subscriptions","organizations_url":"https://api.github.com/users/docsocsf/orgs","repos_url":"https://api.github.com/users/docsocsf/repos","events_url":"https://api.github.com/users/docsocsf/events{/privacy}","received_events_url":"https://api.github.com/users/docsocsf/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/docsocsf/mad","description":"Mums and Dads Portal","fork":false,"url":"https://api.github.com/repos/docsocsf/mad","forks_url":"https://api.github.com/repos/docsocsf/mad/forks","keys_url":"https://api.github.com/repos/docsocsf/mad/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docsocsf/mad/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docsocsf/mad/teams","hooks_url":"https://api.github.com/repos/docsocsf/mad/hooks","issue_events_url":"https://api.github.com/repos/docsocsf/mad/issues/events{/number}","events_url":"https://api.github.com/repos/docsocsf/mad/events","assignees_url":"https://api.github.com/repos/docsocsf/mad/assignees{/user}","branches_url":"https://api.github.com/repos/docsocsf/mad/branches{/branch}","tags_url":"https://api.github.com/repos/docsocsf/mad/tags","blobs_url":"https://api.github.com/repos/docsocsf/mad/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docsocsf/mad/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docsocsf/mad/git/refs{/sha}","trees_url":"https://api.github.com/repos/docsocsf/mad/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docsocsf/mad/statuses/{sha}","languages_url":"https://api.github.com/repos/docsocsf/mad/languages","stargazers_url":"https://api.github.com/repos/docsocsf/mad/stargazers","contributors_url":"https://api.github.com/repos/docsocsf/mad/contributors","subscribers_url":"https://api.github.com/repos/docsocsf/mad/subscribers","subscription_url":"https://api.github.com/repos/docsocsf/mad/subscription","commits_url":"https://api.github.com/repos/docsocsf/mad/commits{/sha}","git_commits_url":"https://api.github.com/repos/docsocsf/mad/git/commits{/sha}","comments_url":"https://api.github.com/repos/docsocsf/mad/comments{/number}","issue_comment_url":"https://api.github.com/repos/docsocsf/mad/issues/comments{/number}","contents_url":"https://api.github.com/repos/docsocsf/mad/contents/{+path}","compare_url":"https://api.github.com/repos/docsocsf/mad/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docsocsf/mad/merges","archive_url":"https://api.github.com/repos/docsocsf/mad/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docsocsf/mad/downloads","issues_url":"https://api.github.com/repos/docsocsf/mad/issues{/number}","pulls_url":"https://api.github.com/repos/docsocsf/mad/pulls{/number}","milestones_url":"https://api.github.com/repos/docsocsf/mad/milestones{/number}","notifications_url":"https://api.github.com/repos/docsocsf/mad/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docsocsf/mad/labels{/name}","releases_url":"https://api.github.com/repos/docsocsf/mad/releases{/id}","deployments_url":"https://api.github.com/repos/docsocsf/mad/deployments","created_at":"2017-06-18T15:29:07Z","updated_at":"2017-06-24T23:32:44Z","pushed_at":"2017-07-16T12:26:05Z","git_url":"git://github.com/docsocsf/mad.git","ssh_url":"git@github.com:docsocsf/mad.git","clone_url":"https://github.com/docsocsf/mad.git","svn_url":"https://github.com/docsocsf/mad","homepage":"","size":43,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":11,"forks":5,"open_issues":11,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docsocsf/mad/pulls/28"},"html":{"href":"https://github.com/docsocsf/mad/pull/28"},"issue":{"href":"https://api.github.com/repos/docsocsf/mad/issues/28"},"comments":{"href":"https://api.github.com/repos/docsocsf/mad/issues/28/comments"},"review_comments":{"href":"https://api.github.com/repos/docsocsf/mad/pulls/28/comments"},"review_comment":{"href":"https://api.github.com/repos/docsocsf/mad/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/docsocsf/mad/pulls/28/commits"},"statuses":{"href":"https://api.github.com/repos/docsocsf/mad/statuses/c9297aed5d2c3ac9ee4e952e22e7e5a8b3f44233"}}}}
{"actor":{"display_login":"levex"}}