{"action":"created","comment":{"url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/pulls/comments/132385878","pull_request_review_id":55454756,"id":132385878,"diff_hunk":"@@ -0,0 +1,306 @@\n+from django.views.generic import ListView, DetailView, CreateView, UpdateView, DeleteView\n+from .models import *\n+from django.http import HttpResponseRedirect\n+from datetime import datetime\n+import reversion\n+\n+\n+# Create your views here.\n+class IndexView(ListView):\n+    template_name = 'projects/index.html'\n+    context_object_name = 'projects'\n+\n+    def get_queryset(self):\n+        return ProjectDetail.objects.exclude(status='ARCHIVED')\n+\n+\n+# DETAILS\n+class ProjectDetailView(DetailView):\n+    model = ProjectDetail\n+    context_object_name = 'pd'\n+    template_name = 'projects/project/project.html'\n+\n+\n+class BundleDetailView(DetailView):\n+    model = BundleDetail\n+    context_object_name = 'bd'\n+    template_name = 'projects/bundles/bundle.html'\n+\n+\n+class BuildDetailView(DetailView):\n+    model = BuildDetail\n+    context_object_name = 'bid'\n+    template_name = 'projects/builds/build.html'\n+\n+\n+class SuiteDetailView(DetailView):\n+    model = SuiteDetail\n+    context_object_name = 'sd'\n+    template_name = 'projects/bundles/suites/suite.html'\n+\n+\n+class TestScenarioDetailView(DetailView):\n+    model = TestScenarioDetail\n+    context_object_name = 'tsd'\n+    template_name = 'projects/tests/scenario.html'\n+\n+\n+class BuildTestDetailView(DetailView):\n+    model = BuildTestDetail\n+    context_object_name = 'btd'\n+    template_name = 'projects/builds/build_tests/build_test.html'\n+\n+\n+class IssueDetailView(DetailView):\n+    model = IssueDetail\n+    context_object_name = 'isd'\n+    template_name = 'projects/bundles/builds/issues/issue.html'\n+\n+\n+# CREATES\n+class ProjectCreate(CreateView):\n+    model = ProjectDetail\n+    fields = ['name', 'description']\n+    template_name = 'projects/project/project_form.html'\n+\n+    def form_valid(self, form):\n+        with reversion.create_revision():\n+            detail = form.save(commit=False)\n+            detail.save()\n+        return HttpResponseRedirect(reverse('projects:index'))\n+\n+\n+class BundleCreate(CreateView):\n+    model = BundleDetail\n+    fields = ['name', 'description']\n+    template_name = 'projects/bundles/bundle_form.html'\n+\n+    def get_context_data(self, **kwargs):\n+        context = super(BundleCreate, self).get_context_data(**kwargs)\n+        context['parent'] = ProjectDetail.objects.get(pk=self.kwargs['project_id'])\n+        return context\n+\n+    def form_valid(self, form):\n+        with reversion.create_revision():\n+            project = ProjectDetail.objects.get(pk=self.kwargs['project_id'])\n+            detail = form.save(commit=False)\n+            detail.project = project\n+            detail.save()\n+            # Create a test suite for the bundle\n+        with reversion.create_revision():\n+            suite = SuiteDetail(bundle=detail, name=detail.name + ' Testing Suite', description='Test suite for ' + detail.name)","path":"projects/views.py","position":91,"original_position":91,"commit_id":"f6136658d797bad295a1a3eded184b43e67d43f0","original_commit_id":"f6136658d797bad295a1a3eded184b43e67d43f0","user":{"login":"tombasche","id":14269184,"avatar_url":"https://avatars0.githubusercontent.com/u/14269184?v=4","gravatar_id":"","url":"https://api.github.com/users/tombasche","html_url":"https://github.com/tombasche","followers_url":"https://api.github.com/users/tombasche/followers","following_url":"https://api.github.com/users/tombasche/following{/other_user}","gists_url":"https://api.github.com/users/tombasche/gists{/gist_id}","starred_url":"https://api.github.com/users/tombasche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tombasche/subscriptions","organizations_url":"https://api.github.com/users/tombasche/orgs","repos_url":"https://api.github.com/users/tombasche/repos","events_url":"https://api.github.com/users/tombasche/events{/privacy}","received_events_url":"https://api.github.com/users/tombasche/received_events","type":"User","site_admin":false},"body":"rather than adding together strings use the format syntax:\r\n\r\n```python\r\ntom = 'tom'\r\nnew_string = '{} is a cool dude'.format(tom)\r\n```","created_at":"2017-08-10T07:54:17Z","updated_at":"2017-08-10T07:56:04Z","html_url":"https://github.com/FiviumAustralia/TAIPAN/pull/1#discussion_r132385878","pull_request_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/FiviumAustralia/TAIPAN/pulls/comments/132385878"},"html":{"href":"https://github.com/FiviumAustralia/TAIPAN/pull/1#discussion_r132385878"},"pull_request":{"href":"https://api.github.com/repos/FiviumAustralia/TAIPAN/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/pulls/1","id":135057981,"html_url":"https://github.com/FiviumAustralia/TAIPAN/pull/1","diff_url":"https://github.com/FiviumAustralia/TAIPAN/pull/1.diff","patch_url":"https://github.com/FiviumAustralia/TAIPAN/pull/1.patch","issue_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/issues/1","number":1,"state":"open","locked":false,"title":"Refactor","user":{"login":"Jarrod-Fivium","id":23516762,"avatar_url":"https://avatars1.githubusercontent.com/u/23516762?v=4","gravatar_id":"","url":"https://api.github.com/users/Jarrod-Fivium","html_url":"https://github.com/Jarrod-Fivium","followers_url":"https://api.github.com/users/Jarrod-Fivium/followers","following_url":"https://api.github.com/users/Jarrod-Fivium/following{/other_user}","gists_url":"https://api.github.com/users/Jarrod-Fivium/gists{/gist_id}","starred_url":"https://api.github.com/users/Jarrod-Fivium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jarrod-Fivium/subscriptions","organizations_url":"https://api.github.com/users/Jarrod-Fivium/orgs","repos_url":"https://api.github.com/users/Jarrod-Fivium/repos","events_url":"https://api.github.com/users/Jarrod-Fivium/events{/privacy}","received_events_url":"https://api.github.com/users/Jarrod-Fivium/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-08-10T07:28:04Z","updated_at":"2017-08-10T07:56:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a46ed1986bbc0199d58cae4bf432b4f2074ae11a","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/pulls/1/commits","review_comments_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/pulls/1/comments","review_comment_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/pulls/comments{/number}","comments_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/issues/1/comments","statuses_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/statuses/f6136658d797bad295a1a3eded184b43e67d43f0","head":{"label":"FiviumAustralia:develop","ref":"develop","sha":"f6136658d797bad295a1a3eded184b43e67d43f0","user":{"login":"FiviumAustralia","id":16315051,"avatar_url":"https://avatars3.githubusercontent.com/u/16315051?v=4","gravatar_id":"","url":"https://api.github.com/users/FiviumAustralia","html_url":"https://github.com/FiviumAustralia","followers_url":"https://api.github.com/users/FiviumAustralia/followers","following_url":"https://api.github.com/users/FiviumAustralia/following{/other_user}","gists_url":"https://api.github.com/users/FiviumAustralia/gists{/gist_id}","starred_url":"https://api.github.com/users/FiviumAustralia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FiviumAustralia/subscriptions","organizations_url":"https://api.github.com/users/FiviumAustralia/orgs","repos_url":"https://api.github.com/users/FiviumAustralia/repos","events_url":"https://api.github.com/users/FiviumAustralia/events{/privacy}","received_events_url":"https://api.github.com/users/FiviumAustralia/received_events","type":"Organization","site_admin":false},"repo":{"id":99632509,"name":"TAIPAN","full_name":"FiviumAustralia/TAIPAN","owner":{"login":"FiviumAustralia","id":16315051,"avatar_url":"https://avatars3.githubusercontent.com/u/16315051?v=4","gravatar_id":"","url":"https://api.github.com/users/FiviumAustralia","html_url":"https://github.com/FiviumAustralia","followers_url":"https://api.github.com/users/FiviumAustralia/followers","following_url":"https://api.github.com/users/FiviumAustralia/following{/other_user}","gists_url":"https://api.github.com/users/FiviumAustralia/gists{/gist_id}","starred_url":"https://api.github.com/users/FiviumAustralia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FiviumAustralia/subscriptions","organizations_url":"https://api.github.com/users/FiviumAustralia/orgs","repos_url":"https://api.github.com/users/FiviumAustralia/repos","events_url":"https://api.github.com/users/FiviumAustralia/events{/privacy}","received_events_url":"https://api.github.com/users/FiviumAustralia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/FiviumAustralia/TAIPAN","description":"Testing, issue management and reporting web application for SIT","fork":false,"url":"https://api.github.com/repos/FiviumAustralia/TAIPAN","forks_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/forks","keys_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/teams","hooks_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/hooks","issue_events_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/issues/events{/number}","events_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/events","assignees_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/assignees{/user}","branches_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/branches{/branch}","tags_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/tags","blobs_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/git/refs{/sha}","trees_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/statuses/{sha}","languages_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/languages","stargazers_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/stargazers","contributors_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/contributors","subscribers_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/subscribers","subscription_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/subscription","commits_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/commits{/sha}","git_commits_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/git/commits{/sha}","comments_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/comments{/number}","issue_comment_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/issues/comments{/number}","contents_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/contents/{+path}","compare_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/merges","archive_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/downloads","issues_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/issues{/number}","pulls_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/pulls{/number}","milestones_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/milestones{/number}","notifications_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/labels{/name}","releases_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/releases{/id}","deployments_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/deployments","created_at":"2017-08-08T00:27:26Z","updated_at":"2017-08-08T00:50:15Z","pushed_at":"2017-08-10T07:28:04Z","git_url":"git://github.com/FiviumAustralia/TAIPAN.git","ssh_url":"git@github.com:FiviumAustralia/TAIPAN.git","clone_url":"https://github.com/FiviumAustralia/TAIPAN.git","svn_url":"https://github.com/FiviumAustralia/TAIPAN","homepage":null,"size":483,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"FiviumAustralia:master","ref":"master","sha":"c0f068680977fd0f962ad02fc3cae95fba57b91a","user":{"login":"FiviumAustralia","id":16315051,"avatar_url":"https://avatars3.githubusercontent.com/u/16315051?v=4","gravatar_id":"","url":"https://api.github.com/users/FiviumAustralia","html_url":"https://github.com/FiviumAustralia","followers_url":"https://api.github.com/users/FiviumAustralia/followers","following_url":"https://api.github.com/users/FiviumAustralia/following{/other_user}","gists_url":"https://api.github.com/users/FiviumAustralia/gists{/gist_id}","starred_url":"https://api.github.com/users/FiviumAustralia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FiviumAustralia/subscriptions","organizations_url":"https://api.github.com/users/FiviumAustralia/orgs","repos_url":"https://api.github.com/users/FiviumAustralia/repos","events_url":"https://api.github.com/users/FiviumAustralia/events{/privacy}","received_events_url":"https://api.github.com/users/FiviumAustralia/received_events","type":"Organization","site_admin":false},"repo":{"id":99632509,"name":"TAIPAN","full_name":"FiviumAustralia/TAIPAN","owner":{"login":"FiviumAustralia","id":16315051,"avatar_url":"https://avatars3.githubusercontent.com/u/16315051?v=4","gravatar_id":"","url":"https://api.github.com/users/FiviumAustralia","html_url":"https://github.com/FiviumAustralia","followers_url":"https://api.github.com/users/FiviumAustralia/followers","following_url":"https://api.github.com/users/FiviumAustralia/following{/other_user}","gists_url":"https://api.github.com/users/FiviumAustralia/gists{/gist_id}","starred_url":"https://api.github.com/users/FiviumAustralia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FiviumAustralia/subscriptions","organizations_url":"https://api.github.com/users/FiviumAustralia/orgs","repos_url":"https://api.github.com/users/FiviumAustralia/repos","events_url":"https://api.github.com/users/FiviumAustralia/events{/privacy}","received_events_url":"https://api.github.com/users/FiviumAustralia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/FiviumAustralia/TAIPAN","description":"Testing, issue management and reporting web application for SIT","fork":false,"url":"https://api.github.com/repos/FiviumAustralia/TAIPAN","forks_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/forks","keys_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/teams","hooks_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/hooks","issue_events_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/issues/events{/number}","events_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/events","assignees_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/assignees{/user}","branches_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/branches{/branch}","tags_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/tags","blobs_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/git/refs{/sha}","trees_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/statuses/{sha}","languages_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/languages","stargazers_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/stargazers","contributors_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/contributors","subscribers_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/subscribers","subscription_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/subscription","commits_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/commits{/sha}","git_commits_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/git/commits{/sha}","comments_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/comments{/number}","issue_comment_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/issues/comments{/number}","contents_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/contents/{+path}","compare_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/merges","archive_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/downloads","issues_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/issues{/number}","pulls_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/pulls{/number}","milestones_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/milestones{/number}","notifications_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/labels{/name}","releases_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/releases{/id}","deployments_url":"https://api.github.com/repos/FiviumAustralia/TAIPAN/deployments","created_at":"2017-08-08T00:27:26Z","updated_at":"2017-08-08T00:50:15Z","pushed_at":"2017-08-10T07:28:04Z","git_url":"git://github.com/FiviumAustralia/TAIPAN.git","ssh_url":"git@github.com:FiviumAustralia/TAIPAN.git","clone_url":"https://github.com/FiviumAustralia/TAIPAN.git","svn_url":"https://github.com/FiviumAustralia/TAIPAN","homepage":null,"size":483,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/FiviumAustralia/TAIPAN/pulls/1"},"html":{"href":"https://github.com/FiviumAustralia/TAIPAN/pull/1"},"issue":{"href":"https://api.github.com/repos/FiviumAustralia/TAIPAN/issues/1"},"comments":{"href":"https://api.github.com/repos/FiviumAustralia/TAIPAN/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/FiviumAustralia/TAIPAN/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/FiviumAustralia/TAIPAN/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/FiviumAustralia/TAIPAN/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/FiviumAustralia/TAIPAN/statuses/f6136658d797bad295a1a3eded184b43e67d43f0"}}}}
{"actor":{"display_login":"tombasche"}}