GitHub PullRequestReviewCommentEvent at 2014-09-02 16:16:19
Repository: liquid
Actor: bjryan2
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/acm-uiuc/liquid/pulls/comments/16997664","id":16997664,"diff_hunk":"@@ -0,0 +1,101 @@\n+from django.shortcuts import render_to_response, redirect, get_object_or_404\n+from django.template import RequestContext\n+from intranet.models import Member, Vending\n+from utils.group_decorator import group_admin_required\n+from intranet.caffeine_manager.user.forms import VendingForm\n+from django.db.models import Q\n+from decimal import Decimal\n+\n+def view(request, netid=None):\n+    searchArg = request.GET.get('q') or ''\n+    vend_user = None\n+    is_caffeine_admin = request.user.is_group_admin('Caffeine')\n+\n+    if searchArg and (not request.GET.get('searched')):\n+        users = Vending.objects.filter(Q(user__first_name = searchArg) | Q(user__last_name = searchArg) | Q(user__username = searchArg)).order_by('-spent', 'balance')\n+\n+        append = '?q=' + searchArg + '&searched=1'\n+        if users:\n+            vend_user = users[0].user\n+            netid = vend_user.username\n+            append =  netid + append\n+\n+        return redirect('/intranet/caffeine/user/' + append)\n+\n+    if netid:\n+        vend_user = get_object_or_404(Member, username=netid)\n+    elif not searchArg:\n+        vend_user = request.user\n+\n+    vending = vend_user.get_vending() if vend_user else None\n+    return render_to_response(\n+     'intranet/caffeine_manager/user/user.html',\n+     {\n+       'section':'intranet',\n+       'page':'caffeine',\n+       'is_caffeine_admin':is_caffeine_admin,\n+       'vend_user':vend_user,\n+       'vending':vending,\n+       'searchArg':searchArg\n+     }, context_instance=RequestContext(request))","path":"liquid/intranet/caffeine_manager/user/views.py","position":40,"original_position":40,"commit_id":"041fd01ec958521edf08973a8ee37ebb8cc5ba00","original_commit_id":"041fd01ec958521edf08973a8ee37ebb8cc5ba00","user":{"login":"bjryan2","id":1572504,"avatar_url":"https://avatars.githubusercontent.com/u/1572504?v=2","gravatar_id":"1a01b13cf164899af211603eaa7acc98","url":"https://api.github.com/users/bjryan2","html_url":"https://github.com/bjryan2","followers_url":"https://api.github.com/users/bjryan2/followers","following_url":"https://api.github.com/users/bjryan2/following{/other_user}","gists_url":"https://api.github.com/users/bjryan2/gists{/gist_id}","starred_url":"https://api.github.com/users/bjryan2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjryan2/subscriptions","organizations_url":"https://api.github.com/users/bjryan2/orgs","repos_url":"https://api.github.com/users/bjryan2/repos","events_url":"https://api.github.com/users/bjryan2/events{/privacy}","received_events_url":"https://api.github.com/users/bjryan2/received_events","type":"User","site_admin":false},"body":"new line","created_at":"2014-09-02T16:16:19Z","updated_at":"2014-09-02T16:16:19Z","html_url":"https://github.com/acm-uiuc/liquid/pull/252#discussion_r16997664","pull_request_url":"https://api.github.com/repos/acm-uiuc/liquid/pulls/252","_links":{"self":{"href":"https://api.github.com/repos/acm-uiuc/liquid/pulls/comments/16997664"},"html":{"href":"https://github.com/acm-uiuc/liquid/pull/252#discussion_r16997664"},"pull_request":{"href":"https://api.github.com/repos/acm-uiuc/liquid/pulls/252"}}},"pull_request":{"url":"https://api.github.com/repos/acm-uiuc/liquid/pulls/252","id":20611761,"html_url":"https://github.com/acm-uiuc/liquid/pull/252","diff_url":"https://github.com/acm-uiuc/liquid/pull/252.diff","patch_url":"https://github.com/acm-uiuc/liquid/pull/252.patch","issue_url":"https://api.github.com/repos/acm-uiuc/liquid/issues/252","number":252,"state":"open","locked":false,"title":"Add caffeine frontend","user":{"login":"ace-n","id":2309317,"avatar_url":"https://avatars.githubusercontent.com/u/2309317?v=2","gravatar_id":"e96192a62f4ecd5a6a6eea1eed91308b","url":"https://api.github.com/users/ace-n","html_url":"https://github.com/ace-n","followers_url":"https://api.github.com/users/ace-n/followers","following_url":"https://api.github.com/users/ace-n/following{/other_user}","gists_url":"https://api.github.com/users/ace-n/gists{/gist_id}","starred_url":"https://api.github.com/users/ace-n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ace-n/subscriptions","organizations_url":"https://api.github.com/users/ace-n/orgs","repos_url":"https://api.github.com/users/ace-n/repos","events_url":"https://api.github.com/users/ace-n/events{/privacy}","received_events_url":"https://api.github.com/users/ace-n/received_events","type":"User","site_admin":false},"body":"Yes, I know this is a huge diff - even without migration scripts. (I didn't want to add partially functioning junk to Liquid in a bunch of smaller/stacked diffs. Nonetheless, I apologize in advance.)\r\n\r\nI've reviewed it several times, but I'd like it to get some fresh eyes before getting merged.\r\n\r\n@CJS7070: [TODO] We need to either implement force-vend SSH capability, or remove it outright. We also need to decide on how soda images are going to work. Whether you want to do those in this diff or a separate one is totally your call since I see arguments for both sides.","created_at":"2014-09-02T13:21:37Z","updated_at":"2014-09-02T16:16:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"87013c57cda6edb6a74ed8fbd74830e22498b0bf","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/acm-uiuc/liquid/pulls/252/commits","review_comments_url":"https://api.github.com/repos/acm-uiuc/liquid/pulls/252/comments","review_comment_url":"https://api.github.com/repos/acm-uiuc/liquid/pulls/comments/{number}","comments_url":"https://api.github.com/repos/acm-uiuc/liquid/issues/252/comments","statuses_url":"https://api.github.com/repos/acm-uiuc/liquid/statuses/041fd01ec958521edf08973a8ee37ebb8cc5ba00","head":{"label":"ace-n:caffeine","ref":"caffeine","sha":"041fd01ec958521edf08973a8ee37ebb8cc5ba00","user":{"login":"ace-n","id":2309317,"avatar_url":"https://avatars.githubusercontent.com/u/2309317?v=2","gravatar_id":"e96192a62f4ecd5a6a6eea1eed91308b","url":"https://api.github.com/users/ace-n","html_url":"https://github.com/ace-n","followers_url":"https://api.github.com/users/ace-n/followers","following_url":"https://api.github.com/users/ace-n/following{/other_user}","gists_url":"https://api.github.com/users/ace-n/gists{/gist_id}","starred_url":"https://api.github.com/users/ace-n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ace-n/subscriptions","organizations_url":"https://api.github.com/users/ace-n/orgs","repos_url":"https://api.github.com/users/ace-n/repos","events_url":"https://api.github.com/users/ace-n/events{/privacy}","received_events_url":"https://api.github.com/users/ace-n/received_events","type":"User","site_admin":false},"repo":{"id":16060584,"name":"liquid","full_name":"ace-n/liquid","owner":{"login":"ace-n","id":2309317,"avatar_url":"https://avatars.githubusercontent.com/u/2309317?v=2","gravatar_id":"e96192a62f4ecd5a6a6eea1eed91308b","url":"https://api.github.com/users/ace-n","html_url":"https://github.com/ace-n","followers_url":"https://api.github.com/users/ace-n/followers","following_url":"https://api.github.com/users/ace-n/following{/other_user}","gists_url":"https://api.github.com/users/ace-n/gists{/gist_id}","starred_url":"https://api.github.com/users/ace-n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ace-n/subscriptions","organizations_url":"https://api.github.com/users/ace-n/orgs","repos_url":"https://api.github.com/users/ace-n/repos","events_url":"https://api.github.com/users/ace-n/events{/privacy}","received_events_url":"https://api.github.com/users/ace-n/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ace-n/liquid","description":"ACM@UIUC's website code (Django)","fork":true,"url":"https://api.github.com/repos/ace-n/liquid","forks_url":"https://api.github.com/repos/ace-n/liquid/forks","keys_url":"https://api.github.com/repos/ace-n/liquid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ace-n/liquid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ace-n/liquid/teams","hooks_url":"https://api.github.com/repos/ace-n/liquid/hooks","issue_events_url":"https://api.github.com/repos/ace-n/liquid/issues/events{/number}","events_url":"https://api.github.com/repos/ace-n/liquid/events","assignees_url":"https://api.github.com/repos/ace-n/liquid/assignees{/user}","branches_url":"https://api.github.com/repos/ace-n/liquid/branches{/branch}","tags_url":"https://api.github.com/repos/ace-n/liquid/tags","blobs_url":"https://api.github.com/repos/ace-n/liquid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ace-n/liquid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ace-n/liquid/git/refs{/sha}","trees_url":"https://api.github.com/repos/ace-n/liquid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ace-n/liquid/statuses/{sha}","languages_url":"https://api.github.com/repos/ace-n/liquid/languages","stargazers_url":"https://api.github.com/repos/ace-n/liquid/stargazers","contributors_url":"https://api.github.com/repos/ace-n/liquid/contributors","subscribers_url":"https://api.github.com/repos/ace-n/liquid/subscribers","subscription_url":"https://api.github.com/repos/ace-n/liquid/subscription","commits_url":"https://api.github.com/repos/ace-n/liquid/commits{/sha}","git_commits_url":"https://api.github.com/repos/ace-n/liquid/git/commits{/sha}","comments_url":"https://api.github.com/repos/ace-n/liquid/comments{/number}","issue_comment_url":"https://api.github.com/repos/ace-n/liquid/issues/comments/{number}","contents_url":"https://api.github.com/repos/ace-n/liquid/contents/{+path}","compare_url":"https://api.github.com/repos/ace-n/liquid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ace-n/liquid/merges","archive_url":"https://api.github.com/repos/ace-n/liquid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ace-n/liquid/downloads","issues_url":"https://api.github.com/repos/ace-n/liquid/issues{/number}","pulls_url":"https://api.github.com/repos/ace-n/liquid/pulls{/number}","milestones_url":"https://api.github.com/repos/ace-n/liquid/milestones{/number}","notifications_url":"https://api.github.com/repos/ace-n/liquid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ace-n/liquid/labels{/name}","releases_url":"https://api.github.com/repos/ace-n/liquid/releases{/id}","created_at":"2014-01-20T03:59:01Z","updated_at":"2014-09-01T11:44:54Z","pushed_at":"2014-09-02T13:17:23Z","git_url":"git://github.com/ace-n/liquid.git","ssh_url":"git@github.com:ace-n/liquid.git","clone_url":"https://github.com/ace-n/liquid.git","svn_url":"https://github.com/ace-n/liquid","homepage":"acm.uiuc.edu","size":266783,"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":"acm-uiuc:master","ref":"master","sha":"1e7a29f586b8ce686d13edf6f0e80029bf6eced1","user":{"login":"acm-uiuc","id":425738,"avatar_url":"https://avatars.githubusercontent.com/u/425738?v=2","gravatar_id":"e5b76f3264c71a3aec8f3e000d60dac7","url":"https://api.github.com/users/acm-uiuc","html_url":"https://github.com/acm-uiuc","followers_url":"https://api.github.com/users/acm-uiuc/followers","following_url":"https://api.github.com/users/acm-uiuc/following{/other_user}","gists_url":"https://api.github.com/users/acm-uiuc/gists{/gist_id}","starred_url":"https://api.github.com/users/acm-uiuc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acm-uiuc/subscriptions","organizations_url":"https://api.github.com/users/acm-uiuc/orgs","repos_url":"https://api.github.com/users/acm-uiuc/repos","events_url":"https://api.github.com/users/acm-uiuc/events{/privacy}","received_events_url":"https://api.github.com/users/acm-uiuc/received_events","type":"Organization","site_admin":false},"repo":{"id":2943728,"name":"liquid","full_name":"acm-uiuc/liquid","owner":{"login":"acm-uiuc","id":425738,"avatar_url":"https://avatars.githubusercontent.com/u/425738?v=2","gravatar_id":"e5b76f3264c71a3aec8f3e000d60dac7","url":"https://api.github.com/users/acm-uiuc","html_url":"https://github.com/acm-uiuc","followers_url":"https://api.github.com/users/acm-uiuc/followers","following_url":"https://api.github.com/users/acm-uiuc/following{/other_user}","gists_url":"https://api.github.com/users/acm-uiuc/gists{/gist_id}","starred_url":"https://api.github.com/users/acm-uiuc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acm-uiuc/subscriptions","organizations_url":"https://api.github.com/users/acm-uiuc/orgs","repos_url":"https://api.github.com/users/acm-uiuc/repos","events_url":"https://api.github.com/users/acm-uiuc/events{/privacy}","received_events_url":"https://api.github.com/users/acm-uiuc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/acm-uiuc/liquid","description":"ACM@UIUC's website code (Django)","fork":false,"url":"https://api.github.com/repos/acm-uiuc/liquid","forks_url":"https://api.github.com/repos/acm-uiuc/liquid/forks","keys_url":"https://api.github.com/repos/acm-uiuc/liquid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/acm-uiuc/liquid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/acm-uiuc/liquid/teams","hooks_url":"https://api.github.com/repos/acm-uiuc/liquid/hooks","issue_events_url":"https://api.github.com/repos/acm-uiuc/liquid/issues/events{/number}","events_url":"https://api.github.com/repos/acm-uiuc/liquid/events","assignees_url":"https://api.github.com/repos/acm-uiuc/liquid/assignees{/user}","branches_url":"https://api.github.com/repos/acm-uiuc/liquid/branches{/branch}","tags_url":"https://api.github.com/repos/acm-uiuc/liquid/tags","blobs_url":"https://api.github.com/repos/acm-uiuc/liquid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/acm-uiuc/liquid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/acm-uiuc/liquid/git/refs{/sha}","trees_url":"https://api.github.com/repos/acm-uiuc/liquid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/acm-uiuc/liquid/statuses/{sha}","languages_url":"https://api.github.com/repos/acm-uiuc/liquid/languages","stargazers_url":"https://api.github.com/repos/acm-uiuc/liquid/stargazers","contributors_url":"https://api.github.com/repos/acm-uiuc/liquid/contributors","subscribers_url":"https://api.github.com/repos/acm-uiuc/liquid/subscribers","subscription_url":"https://api.github.com/repos/acm-uiuc/liquid/subscription","commits_url":"https://api.github.com/repos/acm-uiuc/liquid/commits{/sha}","git_commits_url":"https://api.github.com/repos/acm-uiuc/liquid/git/commits{/sha}","comments_url":"https://api.github.com/repos/acm-uiuc/liquid/comments{/number}","issue_comment_url":"https://api.github.com/repos/acm-uiuc/liquid/issues/comments/{number}","contents_url":"https://api.github.com/repos/acm-uiuc/liquid/contents/{+path}","compare_url":"https://api.github.com/repos/acm-uiuc/liquid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/acm-uiuc/liquid/merges","archive_url":"https://api.github.com/repos/acm-uiuc/liquid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/acm-uiuc/liquid/downloads","issues_url":"https://api.github.com/repos/acm-uiuc/liquid/issues{/number}","pulls_url":"https://api.github.com/repos/acm-uiuc/liquid/pulls{/number}","milestones_url":"https://api.github.com/repos/acm-uiuc/liquid/milestones{/number}","notifications_url":"https://api.github.com/repos/acm-uiuc/liquid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/acm-uiuc/liquid/labels{/name}","releases_url":"https://api.github.com/repos/acm-uiuc/liquid/releases{/id}","created_at":"2011-12-08T22:47:04Z","updated_at":"2014-08-28T01:23:04Z","pushed_at":"2014-09-01T01:40:12Z","git_url":"git://github.com/acm-uiuc/liquid.git","ssh_url":"git@github.com:acm-uiuc/liquid.git","clone_url":"https://github.com/acm-uiuc/liquid.git","svn_url":"https://github.com/acm-uiuc/liquid","homepage":"acm.uiuc.edu","size":268208,"stargazers_count":14,"watchers_count":14,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":28,"mirror_url":null,"open_issues_count":61,"forks":28,"open_issues":61,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/acm-uiuc/liquid/pulls/252"},"html":{"href":"https://github.com/acm-uiuc/liquid/pull/252"},"issue":{"href":"https://api.github.com/repos/acm-uiuc/liquid/issues/252"},"comments":{"href":"https://api.github.com/repos/acm-uiuc/liquid/issues/252/comments"},"review_comments":{"href":"https://api.github.com/repos/acm-uiuc/liquid/pulls/252/comments"},"review_comment":{"href":"https://api.github.com/repos/acm-uiuc/liquid/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/acm-uiuc/liquid/pulls/252/commits"},"statuses":{"href":"https://api.github.com/repos/acm-uiuc/liquid/statuses/041fd01ec958521edf08973a8ee37ebb8cc5ba00"}}}}