GitHub PullRequestReviewCommentEvent at 2014-08-22 08:10:08
Repository: wouso
Actor: alexef
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/rosedu/wouso/pulls/comments/16586707","id":16586707,"diff_hunk":"@@ -1210,16 +1209,32 @@ def clear_cache(request):\n                                   context_instance=RequestContext(request))\n \n \n-class BonusForm(forms.Form):\n-    amount = forms.IntegerField(initial=0)\n-    coin = forms.ModelChoiceField(queryset=Coin.objects.all())\n-    reason = forms.CharField(required=False)\n+@permission_required('config.change_setting')\n+def broadcast_email(request):\n+    \"\"\"\n+     Sends an email to all users in the game\n+    \"\"\"\n+    if request.method == 'POST':\n+        form = BroadcastEmailForm(request.POST)\n+        if form.is_valid():\n+            # Obtain form data\n+            subject = form.cleaned_data['subject']\n+            message = form.cleaned_data['message']\n+            from_email = settings.EMAIL_HOST_USER  # taken from settings.py\n+            # Create an email list with all users that have an email set\n+            email_list = []\n+            user_list = User.objects.all()\n+            for u in user_list:\n+                if u.email:\n+                    email_list.append(u.email)","path":"wouso/interface/cpanel/views.py","position":57,"original_position":57,"commit_id":"b7301d0aba6aaded403748276bcf2d2f7605ad4c","original_commit_id":"b7301d0aba6aaded403748276bcf2d2f7605ad4c","user":{"login":"alexef","id":346576,"avatar_url":"https://avatars.githubusercontent.com/u/346576?v=2","gravatar_id":"d43fad239b039cebdb4206cdc692f314","url":"https://api.github.com/users/alexef","html_url":"https://github.com/alexef","followers_url":"https://api.github.com/users/alexef/followers","following_url":"https://api.github.com/users/alexef/following{/other_user}","gists_url":"https://api.github.com/users/alexef/gists{/gist_id}","starred_url":"https://api.github.com/users/alexef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexef/subscriptions","organizations_url":"https://api.github.com/users/alexef/orgs","repos_url":"https://api.github.com/users/alexef/repos","events_url":"https://api.github.com/users/alexef/events{/privacy}","received_events_url":"https://api.github.com/users/alexef/received_events","type":"User","site_admin":false},"body":"`email_list = [u.email for u in user_list if u.email]`","created_at":"2014-08-22T08:10:08Z","updated_at":"2014-08-22T08:10:08Z","html_url":"https://github.com/rosedu/wouso/pull/495#discussion_r16586707","pull_request_url":"https://api.github.com/repos/rosedu/wouso/pulls/495","_links":{"self":{"href":"https://api.github.com/repos/rosedu/wouso/pulls/comments/16586707"},"html":{"href":"https://github.com/rosedu/wouso/pull/495#discussion_r16586707"},"pull_request":{"href":"https://api.github.com/repos/rosedu/wouso/pulls/495"}}},"pull_request":{"url":"https://api.github.com/repos/rosedu/wouso/pulls/495","id":20062652,"html_url":"https://github.com/rosedu/wouso/pull/495","diff_url":"https://github.com/rosedu/wouso/pull/495.diff","patch_url":"https://github.com/rosedu/wouso/pull/495.patch","issue_url":"https://api.github.com/repos/rosedu/wouso/issues/495","number":495,"state":"open","locked":false,"title":"Initial broadcast email feature","user":{"login":"iulianR","id":6775259,"avatar_url":"https://avatars.githubusercontent.com/u/6775259?v=2","gravatar_id":"c4ed6b70348ea616e536691b2cb6c3d6","url":"https://api.github.com/users/iulianR","html_url":"https://github.com/iulianR","followers_url":"https://api.github.com/users/iulianR/followers","following_url":"https://api.github.com/users/iulianR/following{/other_user}","gists_url":"https://api.github.com/users/iulianR/gists{/gist_id}","starred_url":"https://api.github.com/users/iulianR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iulianR/subscriptions","organizations_url":"https://api.github.com/users/iulianR/orgs","repos_url":"https://api.github.com/users/iulianR/repos","events_url":"https://api.github.com/users/iulianR/events{/privacy}","received_events_url":"https://api.github.com/users/iulianR/received_events","type":"User","site_admin":false},"body":"As discussed in the last meeting.\r\nCan later add mail to a single group/race/class after groups refactoring.\r\n\r\nAn email address and the corresponding password must be set in settings.py. So whoever has access to the 2014 instance of wouso should do that.","created_at":"2014-08-20T18:06:44Z","updated_at":"2014-08-22T08:10:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5d7bb9b0cff90dc1d20fdb4ca5a4b3551981aa0f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rosedu/wouso/pulls/495/commits","review_comments_url":"https://api.github.com/repos/rosedu/wouso/pulls/495/comments","review_comment_url":"https://api.github.com/repos/rosedu/wouso/pulls/comments/{number}","comments_url":"https://api.github.com/repos/rosedu/wouso/issues/495/comments","statuses_url":"https://api.github.com/repos/rosedu/wouso/statuses/b7301d0aba6aaded403748276bcf2d2f7605ad4c","head":{"label":"iulianR:broadcast-mail","ref":"broadcast-mail","sha":"b7301d0aba6aaded403748276bcf2d2f7605ad4c","user":{"login":"iulianR","id":6775259,"avatar_url":"https://avatars.githubusercontent.com/u/6775259?v=2","gravatar_id":"c4ed6b70348ea616e536691b2cb6c3d6","url":"https://api.github.com/users/iulianR","html_url":"https://github.com/iulianR","followers_url":"https://api.github.com/users/iulianR/followers","following_url":"https://api.github.com/users/iulianR/following{/other_user}","gists_url":"https://api.github.com/users/iulianR/gists{/gist_id}","starred_url":"https://api.github.com/users/iulianR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iulianR/subscriptions","organizations_url":"https://api.github.com/users/iulianR/orgs","repos_url":"https://api.github.com/users/iulianR/repos","events_url":"https://api.github.com/users/iulianR/events{/privacy}","received_events_url":"https://api.github.com/users/iulianR/received_events","type":"User","site_admin":false},"repo":{"id":17798351,"name":"wouso","full_name":"iulianR/wouso","owner":{"login":"iulianR","id":6775259,"avatar_url":"https://avatars.githubusercontent.com/u/6775259?v=2","gravatar_id":"c4ed6b70348ea616e536691b2cb6c3d6","url":"https://api.github.com/users/iulianR","html_url":"https://github.com/iulianR","followers_url":"https://api.github.com/users/iulianR/followers","following_url":"https://api.github.com/users/iulianR/following{/other_user}","gists_url":"https://api.github.com/users/iulianR/gists{/gist_id}","starred_url":"https://api.github.com/users/iulianR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iulianR/subscriptions","organizations_url":"https://api.github.com/users/iulianR/orgs","repos_url":"https://api.github.com/users/iulianR/repos","events_url":"https://api.github.com/users/iulianR/events{/privacy}","received_events_url":"https://api.github.com/users/iulianR/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/iulianR/wouso","description":"World of USO - the Official Repository","fork":true,"url":"https://api.github.com/repos/iulianR/wouso","forks_url":"https://api.github.com/repos/iulianR/wouso/forks","keys_url":"https://api.github.com/repos/iulianR/wouso/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iulianR/wouso/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iulianR/wouso/teams","hooks_url":"https://api.github.com/repos/iulianR/wouso/hooks","issue_events_url":"https://api.github.com/repos/iulianR/wouso/issues/events{/number}","events_url":"https://api.github.com/repos/iulianR/wouso/events","assignees_url":"https://api.github.com/repos/iulianR/wouso/assignees{/user}","branches_url":"https://api.github.com/repos/iulianR/wouso/branches{/branch}","tags_url":"https://api.github.com/repos/iulianR/wouso/tags","blobs_url":"https://api.github.com/repos/iulianR/wouso/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iulianR/wouso/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iulianR/wouso/git/refs{/sha}","trees_url":"https://api.github.com/repos/iulianR/wouso/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iulianR/wouso/statuses/{sha}","languages_url":"https://api.github.com/repos/iulianR/wouso/languages","stargazers_url":"https://api.github.com/repos/iulianR/wouso/stargazers","contributors_url":"https://api.github.com/repos/iulianR/wouso/contributors","subscribers_url":"https://api.github.com/repos/iulianR/wouso/subscribers","subscription_url":"https://api.github.com/repos/iulianR/wouso/subscription","commits_url":"https://api.github.com/repos/iulianR/wouso/commits{/sha}","git_commits_url":"https://api.github.com/repos/iulianR/wouso/git/commits{/sha}","comments_url":"https://api.github.com/repos/iulianR/wouso/comments{/number}","issue_comment_url":"https://api.github.com/repos/iulianR/wouso/issues/comments/{number}","contents_url":"https://api.github.com/repos/iulianR/wouso/contents/{+path}","compare_url":"https://api.github.com/repos/iulianR/wouso/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iulianR/wouso/merges","archive_url":"https://api.github.com/repos/iulianR/wouso/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iulianR/wouso/downloads","issues_url":"https://api.github.com/repos/iulianR/wouso/issues{/number}","pulls_url":"https://api.github.com/repos/iulianR/wouso/pulls{/number}","milestones_url":"https://api.github.com/repos/iulianR/wouso/milestones{/number}","notifications_url":"https://api.github.com/repos/iulianR/wouso/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iulianR/wouso/labels{/name}","releases_url":"https://api.github.com/repos/iulianR/wouso/releases{/id}","created_at":"2014-03-16T12:03:01Z","updated_at":"2014-08-05T09:54:44Z","pushed_at":"2014-08-20T18:03:07Z","git_url":"git://github.com/iulianR/wouso.git","ssh_url":"git@github.com:iulianR/wouso.git","clone_url":"https://github.com/iulianR/wouso.git","svn_url":"https://github.com/iulianR/wouso","homepage":"http://wouso.rosedu.org","size":9087,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rosedu:master","ref":"master","sha":"1e60d0c8c0f2b3aa32cfde422aca226a7d505f77","user":{"login":"rosedu","id":1232963,"avatar_url":"https://avatars.githubusercontent.com/u/1232963?v=2","gravatar_id":"0c744eddc2249b224e724f658a1669ff","url":"https://api.github.com/users/rosedu","html_url":"https://github.com/rosedu","followers_url":"https://api.github.com/users/rosedu/followers","following_url":"https://api.github.com/users/rosedu/following{/other_user}","gists_url":"https://api.github.com/users/rosedu/gists{/gist_id}","starred_url":"https://api.github.com/users/rosedu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rosedu/subscriptions","organizations_url":"https://api.github.com/users/rosedu/orgs","repos_url":"https://api.github.com/users/rosedu/repos","events_url":"https://api.github.com/users/rosedu/events{/privacy}","received_events_url":"https://api.github.com/users/rosedu/received_events","type":"Organization","site_admin":false},"repo":{"id":2965476,"name":"wouso","full_name":"rosedu/wouso","owner":{"login":"rosedu","id":1232963,"avatar_url":"https://avatars.githubusercontent.com/u/1232963?v=2","gravatar_id":"0c744eddc2249b224e724f658a1669ff","url":"https://api.github.com/users/rosedu","html_url":"https://github.com/rosedu","followers_url":"https://api.github.com/users/rosedu/followers","following_url":"https://api.github.com/users/rosedu/following{/other_user}","gists_url":"https://api.github.com/users/rosedu/gists{/gist_id}","starred_url":"https://api.github.com/users/rosedu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rosedu/subscriptions","organizations_url":"https://api.github.com/users/rosedu/orgs","repos_url":"https://api.github.com/users/rosedu/repos","events_url":"https://api.github.com/users/rosedu/events{/privacy}","received_events_url":"https://api.github.com/users/rosedu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rosedu/wouso","description":"World of USO - the Official Repository","fork":false,"url":"https://api.github.com/repos/rosedu/wouso","forks_url":"https://api.github.com/repos/rosedu/wouso/forks","keys_url":"https://api.github.com/repos/rosedu/wouso/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rosedu/wouso/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rosedu/wouso/teams","hooks_url":"https://api.github.com/repos/rosedu/wouso/hooks","issue_events_url":"https://api.github.com/repos/rosedu/wouso/issues/events{/number}","events_url":"https://api.github.com/repos/rosedu/wouso/events","assignees_url":"https://api.github.com/repos/rosedu/wouso/assignees{/user}","branches_url":"https://api.github.com/repos/rosedu/wouso/branches{/branch}","tags_url":"https://api.github.com/repos/rosedu/wouso/tags","blobs_url":"https://api.github.com/repos/rosedu/wouso/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rosedu/wouso/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rosedu/wouso/git/refs{/sha}","trees_url":"https://api.github.com/repos/rosedu/wouso/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rosedu/wouso/statuses/{sha}","languages_url":"https://api.github.com/repos/rosedu/wouso/languages","stargazers_url":"https://api.github.com/repos/rosedu/wouso/stargazers","contributors_url":"https://api.github.com/repos/rosedu/wouso/contributors","subscribers_url":"https://api.github.com/repos/rosedu/wouso/subscribers","subscription_url":"https://api.github.com/repos/rosedu/wouso/subscription","commits_url":"https://api.github.com/repos/rosedu/wouso/commits{/sha}","git_commits_url":"https://api.github.com/repos/rosedu/wouso/git/commits{/sha}","comments_url":"https://api.github.com/repos/rosedu/wouso/comments{/number}","issue_comment_url":"https://api.github.com/repos/rosedu/wouso/issues/comments/{number}","contents_url":"https://api.github.com/repos/rosedu/wouso/contents/{+path}","compare_url":"https://api.github.com/repos/rosedu/wouso/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rosedu/wouso/merges","archive_url":"https://api.github.com/repos/rosedu/wouso/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rosedu/wouso/downloads","issues_url":"https://api.github.com/repos/rosedu/wouso/issues{/number}","pulls_url":"https://api.github.com/repos/rosedu/wouso/pulls{/number}","milestones_url":"https://api.github.com/repos/rosedu/wouso/milestones{/number}","notifications_url":"https://api.github.com/repos/rosedu/wouso/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rosedu/wouso/labels{/name}","releases_url":"https://api.github.com/repos/rosedu/wouso/releases{/id}","created_at":"2011-12-12T16:15:01Z","updated_at":"2014-08-04T19:08:16Z","pushed_at":"2014-08-20T18:48:19Z","git_url":"git://github.com/rosedu/wouso.git","ssh_url":"git@github.com:rosedu/wouso.git","clone_url":"https://github.com/rosedu/wouso.git","svn_url":"https://github.com/rosedu/wouso","homepage":"http://wouso.rosedu.org","size":10916,"stargazers_count":16,"watchers_count":16,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":45,"mirror_url":null,"open_issues_count":109,"forks":45,"open_issues":109,"watchers":16,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rosedu/wouso/pulls/495"},"html":{"href":"https://github.com/rosedu/wouso/pull/495"},"issue":{"href":"https://api.github.com/repos/rosedu/wouso/issues/495"},"comments":{"href":"https://api.github.com/repos/rosedu/wouso/issues/495/comments"},"review_comments":{"href":"https://api.github.com/repos/rosedu/wouso/pulls/495/comments"},"review_comment":{"href":"https://api.github.com/repos/rosedu/wouso/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/rosedu/wouso/pulls/495/commits"},"statuses":{"href":"https://api.github.com/repos/rosedu/wouso/statuses/b7301d0aba6aaded403748276bcf2d2f7605ad4c"}}}}