{"action":"created","comment":{"url":"https://api.github.com/repos/praekelt/django-admin-api/pulls/comments/41729384","id":41729384,"diff_hunk":"@@ -7,62 +24,29 @@ var LoginContainer = React.createClass({displayName: 'ReactLogin',\n             type: 'POST',\n             beforeSend: function (xhr) {\n                xhr.setRequestHeader('Authorization', 'Basic ' + btoa(data.username + ':' + data.password));\n-               this.setState({infoMessage: ''});\n             }.bind(this),\n             cache: false,\n             success: function(data) {\n                 console.log('Login success')\n-                this.setState({infoMessage: 'Success token: ' + data.token});\n                 console.log('state set');\n                 Cookies.set('token', data, {expires: 1}, {secure: true});\n                 console.log('Cookie data set');\n-\n-                // Make a GET request to a view that requires auth token header\n-                this.testAuthToken(data);\n-            }.bind(this),\n-            error: function(xhr, status, err) {\n-                jsonError = JSON.parse(xhr.responseText);\n-                console.error(this.props.url, status, err.toString(), ' Reason: ' + jsonError.detail);\n-                this.setState({infoMessage: jsonError.detail});\n-            }.bind(this)\n-        });\n-    },\n-    // Test the received auth token\n-    // Makes a GET call to djangoREST api view, that requires jsw token validation\n-    testAuthToken: function(data) {\n-        $.ajax({\n-            url: '/test/',\n-            dataType: 'json',\n-            type: 'GET',\n-            beforeSend: function (xhr) {\n-                xhr.setRequestHeader('Authorization', 'Token ' + Cookies.getJSON('token').token);\n-                this.setState({infoMessage: ''});\n-                Cookies.remove('token');\n-            }.bind(this),\n-            cache: false,\n-            success: function(data) {\n-                this.setState({infoMessage: 'Success: ' + data.detail});\n+                window.location = '/users/app/';\n             }.bind(this),\n             error: function(xhr, status, err) {\n                 jsonError = JSON.parse(xhr.responseText);\n                 console.error(this.props.url, status, err.toString(), ' Reason: ' + jsonError.detail);\n-                this.setState({infoMessage: jsonError.detail});\n             }.bind(this)\n         });\n     },\n-    getInitialState: function() {\n-        return {infoMessage: ''};\n-    },\n     render: function() {\n         return (\n-            <div className=\"login-container\" >\n+            <div className=\"loginContainer\" >","path":"adminapi/static/react/login.js","position":75,"original_position":75,"commit_id":"ea5bf53bfb06c407f3ef4343bae1551bfe9f8d51","original_commit_id":"ea5bf53bfb06c407f3ef4343bae1551bfe9f8d51","user":{"login":"hedleyroos","id":316314,"avatar_url":"https://avatars.githubusercontent.com/u/316314?v=3","gravatar_id":"","url":"https://api.github.com/users/hedleyroos","html_url":"https://github.com/hedleyroos","followers_url":"https://api.github.com/users/hedleyroos/followers","following_url":"https://api.github.com/users/hedleyroos/following{/other_user}","gists_url":"https://api.github.com/users/hedleyroos/gists{/gist_id}","starred_url":"https://api.github.com/users/hedleyroos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hedleyroos/subscriptions","organizations_url":"https://api.github.com/users/hedleyroos/orgs","repos_url":"https://api.github.com/users/hedleyroos/repos","events_url":"https://api.github.com/users/hedleyroos/events{/privacy}","received_events_url":"https://api.github.com/users/hedleyroos/received_events","type":"User","site_admin":false},"body":"Just call it \"login\". It's obvious from the div that it is a container.","created_at":"2015-10-12T07:18:47Z","updated_at":"2015-10-12T07:18:47Z","html_url":"https://github.com/praekelt/django-admin-api/pull/20#discussion_r41729384","pull_request_url":"https://api.github.com/repos/praekelt/django-admin-api/pulls/20","_links":{"self":{"href":"https://api.github.com/repos/praekelt/django-admin-api/pulls/comments/41729384"},"html":{"href":"https://github.com/praekelt/django-admin-api/pull/20#discussion_r41729384"},"pull_request":{"href":"https://api.github.com/repos/praekelt/django-admin-api/pulls/20"}}},"pull_request":{"url":"https://api.github.com/repos/praekelt/django-admin-api/pulls/20","id":47280849,"html_url":"https://github.com/praekelt/django-admin-api/pull/20","diff_url":"https://github.com/praekelt/django-admin-api/pull/20.diff","patch_url":"https://github.com/praekelt/django-admin-api/pull/20.patch","issue_url":"https://api.github.com/repos/praekelt/django-admin-api/issues/20","number":20,"state":"open","locked":false,"title":"Feature/issue 19","user":{"login":"AltusBarry","id":10414305,"avatar_url":"https://avatars.githubusercontent.com/u/10414305?v=3","gravatar_id":"","url":"https://api.github.com/users/AltusBarry","html_url":"https://github.com/AltusBarry","followers_url":"https://api.github.com/users/AltusBarry/followers","following_url":"https://api.github.com/users/AltusBarry/following{/other_user}","gists_url":"https://api.github.com/users/AltusBarry/gists{/gist_id}","starred_url":"https://api.github.com/users/AltusBarry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AltusBarry/subscriptions","organizations_url":"https://api.github.com/users/AltusBarry/orgs","repos_url":"https://api.github.com/users/AltusBarry/repos","events_url":"https://api.github.com/users/AltusBarry/events{/privacy}","received_events_url":"https://api.github.com/users/AltusBarry/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-09T14:51:20Z","updated_at":"2015-10-12T07:18:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c69ac3d00895e6d40d52a79f63a7142ee2bba8c3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/praekelt/django-admin-api/pulls/20/commits","review_comments_url":"https://api.github.com/repos/praekelt/django-admin-api/pulls/20/comments","review_comment_url":"https://api.github.com/repos/praekelt/django-admin-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/praekelt/django-admin-api/issues/20/comments","statuses_url":"https://api.github.com/repos/praekelt/django-admin-api/statuses/ea5bf53bfb06c407f3ef4343bae1551bfe9f8d51","head":{"label":"praekelt:feature/Issue-19","ref":"feature/Issue-19","sha":"ea5bf53bfb06c407f3ef4343bae1551bfe9f8d51","user":{"login":"praekelt","id":81810,"avatar_url":"https://avatars.githubusercontent.com/u/81810?v=3","gravatar_id":"","url":"https://api.github.com/users/praekelt","html_url":"https://github.com/praekelt","followers_url":"https://api.github.com/users/praekelt/followers","following_url":"https://api.github.com/users/praekelt/following{/other_user}","gists_url":"https://api.github.com/users/praekelt/gists{/gist_id}","starred_url":"https://api.github.com/users/praekelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/praekelt/subscriptions","organizations_url":"https://api.github.com/users/praekelt/orgs","repos_url":"https://api.github.com/users/praekelt/repos","events_url":"https://api.github.com/users/praekelt/events{/privacy}","received_events_url":"https://api.github.com/users/praekelt/received_events","type":"Organization","site_admin":false},"repo":{"id":42231300,"name":"django-admin-api","full_name":"praekelt/django-admin-api","owner":{"login":"praekelt","id":81810,"avatar_url":"https://avatars.githubusercontent.com/u/81810?v=3","gravatar_id":"","url":"https://api.github.com/users/praekelt","html_url":"https://github.com/praekelt","followers_url":"https://api.github.com/users/praekelt/followers","following_url":"https://api.github.com/users/praekelt/following{/other_user}","gists_url":"https://api.github.com/users/praekelt/gists{/gist_id}","starred_url":"https://api.github.com/users/praekelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/praekelt/subscriptions","organizations_url":"https://api.github.com/users/praekelt/orgs","repos_url":"https://api.github.com/users/praekelt/repos","events_url":"https://api.github.com/users/praekelt/events{/privacy}","received_events_url":"https://api.github.com/users/praekelt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/praekelt/django-admin-api","description":"Expose Django's admin as a RESTful service","fork":false,"url":"https://api.github.com/repos/praekelt/django-admin-api","forks_url":"https://api.github.com/repos/praekelt/django-admin-api/forks","keys_url":"https://api.github.com/repos/praekelt/django-admin-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/praekelt/django-admin-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/praekelt/django-admin-api/teams","hooks_url":"https://api.github.com/repos/praekelt/django-admin-api/hooks","issue_events_url":"https://api.github.com/repos/praekelt/django-admin-api/issues/events{/number}","events_url":"https://api.github.com/repos/praekelt/django-admin-api/events","assignees_url":"https://api.github.com/repos/praekelt/django-admin-api/assignees{/user}","branches_url":"https://api.github.com/repos/praekelt/django-admin-api/branches{/branch}","tags_url":"https://api.github.com/repos/praekelt/django-admin-api/tags","blobs_url":"https://api.github.com/repos/praekelt/django-admin-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/praekelt/django-admin-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/praekelt/django-admin-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/praekelt/django-admin-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/praekelt/django-admin-api/statuses/{sha}","languages_url":"https://api.github.com/repos/praekelt/django-admin-api/languages","stargazers_url":"https://api.github.com/repos/praekelt/django-admin-api/stargazers","contributors_url":"https://api.github.com/repos/praekelt/django-admin-api/contributors","subscribers_url":"https://api.github.com/repos/praekelt/django-admin-api/subscribers","subscription_url":"https://api.github.com/repos/praekelt/django-admin-api/subscription","commits_url":"https://api.github.com/repos/praekelt/django-admin-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/praekelt/django-admin-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/praekelt/django-admin-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/praekelt/django-admin-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/praekelt/django-admin-api/contents/{+path}","compare_url":"https://api.github.com/repos/praekelt/django-admin-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/praekelt/django-admin-api/merges","archive_url":"https://api.github.com/repos/praekelt/django-admin-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/praekelt/django-admin-api/downloads","issues_url":"https://api.github.com/repos/praekelt/django-admin-api/issues{/number}","pulls_url":"https://api.github.com/repos/praekelt/django-admin-api/pulls{/number}","milestones_url":"https://api.github.com/repos/praekelt/django-admin-api/milestones{/number}","notifications_url":"https://api.github.com/repos/praekelt/django-admin-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/praekelt/django-admin-api/labels{/name}","releases_url":"https://api.github.com/repos/praekelt/django-admin-api/releases{/id}","created_at":"2015-09-10T08:09:14Z","updated_at":"2015-10-09T12:37:06Z","pushed_at":"2015-10-12T07:13:33Z","git_url":"git://github.com/praekelt/django-admin-api.git","ssh_url":"git@github.com:praekelt/django-admin-api.git","clone_url":"https://github.com/praekelt/django-admin-api.git","svn_url":"https://github.com/praekelt/django-admin-api","homepage":null,"size":844,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":4,"default_branch":"develop"}},"base":{"label":"praekelt:develop","ref":"develop","sha":"101c2aab7f7c006e49f0e23f7693556a64061b69","user":{"login":"praekelt","id":81810,"avatar_url":"https://avatars.githubusercontent.com/u/81810?v=3","gravatar_id":"","url":"https://api.github.com/users/praekelt","html_url":"https://github.com/praekelt","followers_url":"https://api.github.com/users/praekelt/followers","following_url":"https://api.github.com/users/praekelt/following{/other_user}","gists_url":"https://api.github.com/users/praekelt/gists{/gist_id}","starred_url":"https://api.github.com/users/praekelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/praekelt/subscriptions","organizations_url":"https://api.github.com/users/praekelt/orgs","repos_url":"https://api.github.com/users/praekelt/repos","events_url":"https://api.github.com/users/praekelt/events{/privacy}","received_events_url":"https://api.github.com/users/praekelt/received_events","type":"Organization","site_admin":false},"repo":{"id":42231300,"name":"django-admin-api","full_name":"praekelt/django-admin-api","owner":{"login":"praekelt","id":81810,"avatar_url":"https://avatars.githubusercontent.com/u/81810?v=3","gravatar_id":"","url":"https://api.github.com/users/praekelt","html_url":"https://github.com/praekelt","followers_url":"https://api.github.com/users/praekelt/followers","following_url":"https://api.github.com/users/praekelt/following{/other_user}","gists_url":"https://api.github.com/users/praekelt/gists{/gist_id}","starred_url":"https://api.github.com/users/praekelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/praekelt/subscriptions","organizations_url":"https://api.github.com/users/praekelt/orgs","repos_url":"https://api.github.com/users/praekelt/repos","events_url":"https://api.github.com/users/praekelt/events{/privacy}","received_events_url":"https://api.github.com/users/praekelt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/praekelt/django-admin-api","description":"Expose Django's admin as a RESTful service","fork":false,"url":"https://api.github.com/repos/praekelt/django-admin-api","forks_url":"https://api.github.com/repos/praekelt/django-admin-api/forks","keys_url":"https://api.github.com/repos/praekelt/django-admin-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/praekelt/django-admin-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/praekelt/django-admin-api/teams","hooks_url":"https://api.github.com/repos/praekelt/django-admin-api/hooks","issue_events_url":"https://api.github.com/repos/praekelt/django-admin-api/issues/events{/number}","events_url":"https://api.github.com/repos/praekelt/django-admin-api/events","assignees_url":"https://api.github.com/repos/praekelt/django-admin-api/assignees{/user}","branches_url":"https://api.github.com/repos/praekelt/django-admin-api/branches{/branch}","tags_url":"https://api.github.com/repos/praekelt/django-admin-api/tags","blobs_url":"https://api.github.com/repos/praekelt/django-admin-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/praekelt/django-admin-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/praekelt/django-admin-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/praekelt/django-admin-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/praekelt/django-admin-api/statuses/{sha}","languages_url":"https://api.github.com/repos/praekelt/django-admin-api/languages","stargazers_url":"https://api.github.com/repos/praekelt/django-admin-api/stargazers","contributors_url":"https://api.github.com/repos/praekelt/django-admin-api/contributors","subscribers_url":"https://api.github.com/repos/praekelt/django-admin-api/subscribers","subscription_url":"https://api.github.com/repos/praekelt/django-admin-api/subscription","commits_url":"https://api.github.com/repos/praekelt/django-admin-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/praekelt/django-admin-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/praekelt/django-admin-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/praekelt/django-admin-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/praekelt/django-admin-api/contents/{+path}","compare_url":"https://api.github.com/repos/praekelt/django-admin-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/praekelt/django-admin-api/merges","archive_url":"https://api.github.com/repos/praekelt/django-admin-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/praekelt/django-admin-api/downloads","issues_url":"https://api.github.com/repos/praekelt/django-admin-api/issues{/number}","pulls_url":"https://api.github.com/repos/praekelt/django-admin-api/pulls{/number}","milestones_url":"https://api.github.com/repos/praekelt/django-admin-api/milestones{/number}","notifications_url":"https://api.github.com/repos/praekelt/django-admin-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/praekelt/django-admin-api/labels{/name}","releases_url":"https://api.github.com/repos/praekelt/django-admin-api/releases{/id}","created_at":"2015-09-10T08:09:14Z","updated_at":"2015-10-09T12:37:06Z","pushed_at":"2015-10-12T07:13:33Z","git_url":"git://github.com/praekelt/django-admin-api.git","ssh_url":"git@github.com:praekelt/django-admin-api.git","clone_url":"https://github.com/praekelt/django-admin-api.git","svn_url":"https://github.com/praekelt/django-admin-api","homepage":null,"size":844,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":4,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/praekelt/django-admin-api/pulls/20"},"html":{"href":"https://github.com/praekelt/django-admin-api/pull/20"},"issue":{"href":"https://api.github.com/repos/praekelt/django-admin-api/issues/20"},"comments":{"href":"https://api.github.com/repos/praekelt/django-admin-api/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/praekelt/django-admin-api/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/praekelt/django-admin-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/praekelt/django-admin-api/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/praekelt/django-admin-api/statuses/ea5bf53bfb06c407f3ef4343bae1551bfe9f8d51"}}}}