{"action":"created","comment":{"url":"https://api.github.com/repos/djangogirlsjobs/djangogirls/pulls/comments/29126287","id":29126287,"diff_hunk":"@@ -22,9 +33,75 @@ class JobAdmin(admin.ModelAdmin):\n         models.TextField: {'widget': AutosizedTextarea},\n     }\n \n+    def get_urls(self):\n+        urls = super(JobAdmin, self).get_urls()\n+        my_urls = patterns('',\n+            url(\n+                r'^(?P<id>\\d+)/assign/$',\n+                self.assign_job_reviewer,","path":"jobs/admin.py","position":35,"original_position":35,"commit_id":"d65c4df54a2e13eb96ecab8c4aed8abc415a8e18","original_commit_id":"d65c4df54a2e13eb96ecab8c4aed8abc415a8e18","user":{"login":"rebkwok","id":6770950,"avatar_url":"https://avatars.githubusercontent.com/u/6770950?v=3","gravatar_id":"","url":"https://api.github.com/users/rebkwok","html_url":"https://github.com/rebkwok","followers_url":"https://api.github.com/users/rebkwok/followers","following_url":"https://api.github.com/users/rebkwok/following{/other_user}","gists_url":"https://api.github.com/users/rebkwok/gists{/gist_id}","starred_url":"https://api.github.com/users/rebkwok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rebkwok/subscriptions","organizations_url":"https://api.github.com/users/rebkwok/orgs","repos_url":"https://api.github.com/users/rebkwok/repos","events_url":"https://api.github.com/users/rebkwok/events{/privacy}","received_events_url":"https://api.github.com/users/rebkwok/received_events","type":"User","site_admin":false},"body":"Wrap each view with ```self.admin_site.admin_view()```; this means it will use the default admin permissions - see docs here: https://docs.djangoproject.com/en/1.7/ref/contrib/admin/\r\ne..g\r\n```\r\n    url(\r\n        r'^(?P<id>\\d+)/assign/$',\r\n        self.admin_site.admin_view(self.assign_job_reviewer),\r\n        name='assign_job_reviewer'\r\n    )\r\n```","created_at":"2015-04-27T07:55:05Z","updated_at":"2015-04-27T07:55:05Z","html_url":"https://github.com/djangogirlsjobs/djangogirls/pull/25#discussion_r29126287","pull_request_url":"https://api.github.com/repos/djangogirlsjobs/djangogirls/pulls/25","_links":{"self":{"href":"https://api.github.com/repos/djangogirlsjobs/djangogirls/pulls/comments/29126287"},"html":{"href":"https://github.com/djangogirlsjobs/djangogirls/pull/25#discussion_r29126287"},"pull_request":{"href":"https://api.github.com/repos/djangogirlsjobs/djangogirls/pulls/25"}}},"pull_request":{"url":"https://api.github.com/repos/djangogirlsjobs/djangogirls/pulls/25","id":34122893,"html_url":"https://github.com/djangogirlsjobs/djangogirls/pull/25","diff_url":"https://github.com/djangogirlsjobs/djangogirls/pull/25.diff","patch_url":"https://github.com/djangogirlsjobs/djangogirls/pull/25.patch","issue_url":"https://api.github.com/repos/djangogirlsjobs/djangogirls/issues/25","number":25,"state":"open","locked":false,"title":"Adding custom tools to admin site","user":{"login":"MarysiaLowas","id":8274152,"avatar_url":"https://avatars.githubusercontent.com/u/8274152?v=3","gravatar_id":"","url":"https://api.github.com/users/MarysiaLowas","html_url":"https://github.com/MarysiaLowas","followers_url":"https://api.github.com/users/MarysiaLowas/followers","following_url":"https://api.github.com/users/MarysiaLowas/following{/other_user}","gists_url":"https://api.github.com/users/MarysiaLowas/gists{/gist_id}","starred_url":"https://api.github.com/users/MarysiaLowas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarysiaLowas/subscriptions","organizations_url":"https://api.github.com/users/MarysiaLowas/orgs","repos_url":"https://api.github.com/users/MarysiaLowas/repos","events_url":"https://api.github.com/users/MarysiaLowas/events{/privacy}","received_events_url":"https://api.github.com/users/MarysiaLowas/received_events","type":"User","site_admin":false},"body":"@rebkwok I've looked around how to customize the Django admin and I've tried out this approach: http://stackoverflow.com/questions/17919361/how-can-i-add-a-button-into-django-admin-change-list-view-page. \r\nIs it a good way to go?\r\n\r\n\r\nAdding custom tools to assign or unassign the reviewer. After this commit, the reviewer can only\r\nassign themselves to the post or unassign - leaving the reviewer field empty.\r\n\r\nThis is an initial commit just to gain feedback on the used approach.","created_at":"2015-04-26T13:11:03Z","updated_at":"2015-04-27T07:55:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d9619fa1cb6b9073362f81acb1c57ff537b085dc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/djangogirlsjobs/djangogirls/pulls/25/commits","review_comments_url":"https://api.github.com/repos/djangogirlsjobs/djangogirls/pulls/25/comments","review_comment_url":"https://api.github.com/repos/djangogirlsjobs/djangogirls/pulls/comments{/number}","comments_url":"https://api.github.com/repos/djangogirlsjobs/djangogirls/issues/25/comments","statuses_url":"https://api.github.com/repos/djangogirlsjobs/djangogirls/statuses/d65c4df54a2e13eb96ecab8c4aed8abc415a8e18","head":{"label":"MarysiaLowas:master","ref":"master","sha":"d65c4df54a2e13eb96ecab8c4aed8abc415a8e18","user":{"login":"MarysiaLowas","id":8274152,"avatar_url":"https://avatars.githubusercontent.com/u/8274152?v=3","gravatar_id":"","url":"https://api.github.com/users/MarysiaLowas","html_url":"https://github.com/MarysiaLowas","followers_url":"https://api.github.com/users/MarysiaLowas/followers","following_url":"https://api.github.com/users/MarysiaLowas/following{/other_user}","gists_url":"https://api.github.com/users/MarysiaLowas/gists{/gist_id}","starred_url":"https://api.github.com/users/MarysiaLowas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarysiaLowas/subscriptions","organizations_url":"https://api.github.com/users/MarysiaLowas/orgs","repos_url":"https://api.github.com/users/MarysiaLowas/repos","events_url":"https://api.github.com/users/MarysiaLowas/events{/privacy}","received_events_url":"https://api.github.com/users/MarysiaLowas/received_events","type":"User","site_admin":false},"repo":{"id":28883891,"name":"djangogirls","full_name":"MarysiaLowas/djangogirls","owner":{"login":"MarysiaLowas","id":8274152,"avatar_url":"https://avatars.githubusercontent.com/u/8274152?v=3","gravatar_id":"","url":"https://api.github.com/users/MarysiaLowas","html_url":"https://github.com/MarysiaLowas","followers_url":"https://api.github.com/users/MarysiaLowas/followers","following_url":"https://api.github.com/users/MarysiaLowas/following{/other_user}","gists_url":"https://api.github.com/users/MarysiaLowas/gists{/gist_id}","starred_url":"https://api.github.com/users/MarysiaLowas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarysiaLowas/subscriptions","organizations_url":"https://api.github.com/users/MarysiaLowas/orgs","repos_url":"https://api.github.com/users/MarysiaLowas/repos","events_url":"https://api.github.com/users/MarysiaLowas/events{/privacy}","received_events_url":"https://api.github.com/users/MarysiaLowas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MarysiaLowas/djangogirls","description":"Website for DjangoGirls.org","fork":true,"url":"https://api.github.com/repos/MarysiaLowas/djangogirls","forks_url":"https://api.github.com/repos/MarysiaLowas/djangogirls/forks","keys_url":"https://api.github.com/repos/MarysiaLowas/djangogirls/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MarysiaLowas/djangogirls/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MarysiaLowas/djangogirls/teams","hooks_url":"https://api.github.com/repos/MarysiaLowas/djangogirls/hooks","issue_events_url":"https://api.github.com/repos/MarysiaLowas/djangogirls/issues/events{/number}","events_url":"https://api.github.com/repos/MarysiaLowas/djangogirls/events","assignees_url":"https://api.github.com/repos/MarysiaLowas/djangogirls/assignees{/user}","branches_url":"https://api.github.com/repos/MarysiaLowas/djangogirls/branches{/branch}","tags_url":"https://api.github.com/repos/MarysiaLowas/djangogirls/tags","blobs_url":"https://api.github.com/repos/MarysiaLowas/djangogirls/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MarysiaLowas/djangogirls/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MarysiaLowas/djangogirls/git/refs{/sha}","trees_url":"https://api.github.com/repos/MarysiaLowas/djangogirls/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MarysiaLowas/djangogirls/statuses/{sha}","languages_url":"https://api.github.com/repos/MarysiaLowas/djangogirls/languages","stargazers_url":"https://api.github.com/repos/MarysiaLowas/djangogirls/stargazers","contributors_url":"https://api.github.com/repos/MarysiaLowas/djangogirls/contributors","subscribers_url":"https://api.github.com/repos/MarysiaLowas/djangogirls/subscribers","subscription_url":"https://api.github.com/repos/MarysiaLowas/djangogirls/subscription","commits_url":"https://api.github.com/repos/MarysiaLowas/djangogirls/commits{/sha}","git_commits_url":"https://api.github.com/repos/MarysiaLowas/djangogirls/git/commits{/sha}","comments_url":"https://api.github.com/repos/MarysiaLowas/djangogirls/comments{/number}","issue_comment_url":"https://api.github.com/repos/MarysiaLowas/djangogirls/issues/comments{/number}","contents_url":"https://api.github.com/repos/MarysiaLowas/djangogirls/contents/{+path}","compare_url":"https://api.github.com/repos/MarysiaLowas/djangogirls/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MarysiaLowas/djangogirls/merges","archive_url":"https://api.github.com/repos/MarysiaLowas/djangogirls/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MarysiaLowas/djangogirls/downloads","issues_url":"https://api.github.com/repos/MarysiaLowas/djangogirls/issues{/number}","pulls_url":"https://api.github.com/repos/MarysiaLowas/djangogirls/pulls{/number}","milestones_url":"https://api.github.com/repos/MarysiaLowas/djangogirls/milestones{/number}","notifications_url":"https://api.github.com/repos/MarysiaLowas/djangogirls/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MarysiaLowas/djangogirls/labels{/name}","releases_url":"https://api.github.com/repos/MarysiaLowas/djangogirls/releases{/id}","created_at":"2015-01-06T21:14:38Z","updated_at":"2015-04-26T21:21:00Z","pushed_at":"2015-04-26T21:20:59Z","git_url":"git://github.com/MarysiaLowas/djangogirls.git","ssh_url":"git@github.com:MarysiaLowas/djangogirls.git","clone_url":"https://github.com/MarysiaLowas/djangogirls.git","svn_url":"https://github.com/MarysiaLowas/djangogirls","homepage":"http://djangogirls.org/","size":56799,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"djangogirlsjobs:master","ref":"master","sha":"ecbc1af24ea2489c52d56121c9132ae8434f10d3","user":{"login":"djangogirlsjobs","id":10426055,"avatar_url":"https://avatars.githubusercontent.com/u/10426055?v=3","gravatar_id":"","url":"https://api.github.com/users/djangogirlsjobs","html_url":"https://github.com/djangogirlsjobs","followers_url":"https://api.github.com/users/djangogirlsjobs/followers","following_url":"https://api.github.com/users/djangogirlsjobs/following{/other_user}","gists_url":"https://api.github.com/users/djangogirlsjobs/gists{/gist_id}","starred_url":"https://api.github.com/users/djangogirlsjobs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djangogirlsjobs/subscriptions","organizations_url":"https://api.github.com/users/djangogirlsjobs/orgs","repos_url":"https://api.github.com/users/djangogirlsjobs/repos","events_url":"https://api.github.com/users/djangogirlsjobs/events{/privacy}","received_events_url":"https://api.github.com/users/djangogirlsjobs/received_events","type":"Organization","site_admin":false},"repo":{"id":28883258,"name":"djangogirls","full_name":"djangogirlsjobs/djangogirls","owner":{"login":"djangogirlsjobs","id":10426055,"avatar_url":"https://avatars.githubusercontent.com/u/10426055?v=3","gravatar_id":"","url":"https://api.github.com/users/djangogirlsjobs","html_url":"https://github.com/djangogirlsjobs","followers_url":"https://api.github.com/users/djangogirlsjobs/followers","following_url":"https://api.github.com/users/djangogirlsjobs/following{/other_user}","gists_url":"https://api.github.com/users/djangogirlsjobs/gists{/gist_id}","starred_url":"https://api.github.com/users/djangogirlsjobs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djangogirlsjobs/subscriptions","organizations_url":"https://api.github.com/users/djangogirlsjobs/orgs","repos_url":"https://api.github.com/users/djangogirlsjobs/repos","events_url":"https://api.github.com/users/djangogirlsjobs/events{/privacy}","received_events_url":"https://api.github.com/users/djangogirlsjobs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/djangogirlsjobs/djangogirls","description":"Website for DjangoGirls.org","fork":true,"url":"https://api.github.com/repos/djangogirlsjobs/djangogirls","forks_url":"https://api.github.com/repos/djangogirlsjobs/djangogirls/forks","keys_url":"https://api.github.com/repos/djangogirlsjobs/djangogirls/keys{/key_id}","collaborators_url":"https://api.github.com/repos/djangogirlsjobs/djangogirls/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/djangogirlsjobs/djangogirls/teams","hooks_url":"https://api.github.com/repos/djangogirlsjobs/djangogirls/hooks","issue_events_url":"https://api.github.com/repos/djangogirlsjobs/djangogirls/issues/events{/number}","events_url":"https://api.github.com/repos/djangogirlsjobs/djangogirls/events","assignees_url":"https://api.github.com/repos/djangogirlsjobs/djangogirls/assignees{/user}","branches_url":"https://api.github.com/repos/djangogirlsjobs/djangogirls/branches{/branch}","tags_url":"https://api.github.com/repos/djangogirlsjobs/djangogirls/tags","blobs_url":"https://api.github.com/repos/djangogirlsjobs/djangogirls/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/djangogirlsjobs/djangogirls/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/djangogirlsjobs/djangogirls/git/refs{/sha}","trees_url":"https://api.github.com/repos/djangogirlsjobs/djangogirls/git/trees{/sha}","statuses_url":"https://api.github.com/repos/djangogirlsjobs/djangogirls/statuses/{sha}","languages_url":"https://api.github.com/repos/djangogirlsjobs/djangogirls/languages","stargazers_url":"https://api.github.com/repos/djangogirlsjobs/djangogirls/stargazers","contributors_url":"https://api.github.com/repos/djangogirlsjobs/djangogirls/contributors","subscribers_url":"https://api.github.com/repos/djangogirlsjobs/djangogirls/subscribers","subscription_url":"https://api.github.com/repos/djangogirlsjobs/djangogirls/subscription","commits_url":"https://api.github.com/repos/djangogirlsjobs/djangogirls/commits{/sha}","git_commits_url":"https://api.github.com/repos/djangogirlsjobs/djangogirls/git/commits{/sha}","comments_url":"https://api.github.com/repos/djangogirlsjobs/djangogirls/comments{/number}","issue_comment_url":"https://api.github.com/repos/djangogirlsjobs/djangogirls/issues/comments{/number}","contents_url":"https://api.github.com/repos/djangogirlsjobs/djangogirls/contents/{+path}","compare_url":"https://api.github.com/repos/djangogirlsjobs/djangogirls/compare/{base}...{head}","merges_url":"https://api.github.com/repos/djangogirlsjobs/djangogirls/merges","archive_url":"https://api.github.com/repos/djangogirlsjobs/djangogirls/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/djangogirlsjobs/djangogirls/downloads","issues_url":"https://api.github.com/repos/djangogirlsjobs/djangogirls/issues{/number}","pulls_url":"https://api.github.com/repos/djangogirlsjobs/djangogirls/pulls{/number}","milestones_url":"https://api.github.com/repos/djangogirlsjobs/djangogirls/milestones{/number}","notifications_url":"https://api.github.com/repos/djangogirlsjobs/djangogirls/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/djangogirlsjobs/djangogirls/labels{/name}","releases_url":"https://api.github.com/repos/djangogirlsjobs/djangogirls/releases{/id}","created_at":"2015-01-06T20:58:42Z","updated_at":"2015-04-21T08:15:28Z","pushed_at":"2015-04-26T21:20:59Z","git_url":"git://github.com/djangogirlsjobs/djangogirls.git","ssh_url":"git@github.com:djangogirlsjobs/djangogirls.git","clone_url":"https://github.com/djangogirlsjobs/djangogirls.git","svn_url":"https://github.com/djangogirlsjobs/djangogirls","homepage":"http://djangogirls.org/","size":57089,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3,"mirror_url":null,"open_issues_count":3,"forks":3,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/djangogirlsjobs/djangogirls/pulls/25"},"html":{"href":"https://github.com/djangogirlsjobs/djangogirls/pull/25"},"issue":{"href":"https://api.github.com/repos/djangogirlsjobs/djangogirls/issues/25"},"comments":{"href":"https://api.github.com/repos/djangogirlsjobs/djangogirls/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/djangogirlsjobs/djangogirls/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/djangogirlsjobs/djangogirls/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/djangogirlsjobs/djangogirls/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/djangogirlsjobs/djangogirls/statuses/d65c4df54a2e13eb96ecab8c4aed8abc415a8e18"}}}}