{"action":"created","comment":{"url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/pulls/comments/87715509","pull_request_review_id":8317658,"id":87715509,"diff_hunk":"@@ -0,0 +1,20 @@\n+from django.shortcuts import render, redirect, HttpResponse\n+\n+\n+# Create your views here.\n+def index(request):\n+    return render(request, 'vanishturtles/index.html' )\n+\n+def turtle_images(request, color):\n+    if color == '':\n+        return render(request, 'vanishturtles/allturtles.html')\n+    if color == 'blue':\n+        return render(request, 'vanishturtles/leonardo.html')\n+    elif color == 'orange':\n+        return render(request, 'vanishturtles/michelangelo.html')\n+    elif color == 'red':\n+        return render(request, 'vanishturtles/raphael.html')\n+    elif color == 'purple':\n+        return render(request, 'vanishturtles/donatello.html')\n+    else:\n+        return render(request, 'vanishturtles/nohack.html')","path":"monicahenderson/ninja_turtles/apps/vanishturtles/views.py","position":20,"original_position":20,"commit_id":"4f80ed847a1f12c8ebb7bfbedf50d239a56a9b3a","original_commit_id":"4f80ed847a1f12c8ebb7bfbedf50d239a56a9b3a","user":{"login":"chrisulanowicz","id":18199508,"avatar_url":"https://avatars.githubusercontent.com/u/18199508?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisulanowicz","html_url":"https://github.com/chrisulanowicz","followers_url":"https://api.github.com/users/chrisulanowicz/followers","following_url":"https://api.github.com/users/chrisulanowicz/following{/other_user}","gists_url":"https://api.github.com/users/chrisulanowicz/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisulanowicz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisulanowicz/subscriptions","organizations_url":"https://api.github.com/users/chrisulanowicz/orgs","repos_url":"https://api.github.com/users/chrisulanowicz/repos","events_url":"https://api.github.com/users/chrisulanowicz/events{/privacy}","received_events_url":"https://api.github.com/users/chrisulanowicz/received_events","type":"User","site_admin":false},"body":"Everything looks good, but there's some repetition to think about.  Right now you have a different html file for each image even though every html file is identical.  This is a good case for just creating one single html file for the images and when you render that file, just pass the name of the image file you want to use in a context object.  For example:\r\nif color == 'blue':\r\n    context = {'image': 'vanishturtles/images/leonardo.jpg'}\r\n     return render(request, vanishturtles/something.html, context)\r\n\r\nthen in the html file the image tag would look like:\r\n     <img src=\"{% static image %}\">","created_at":"2016-11-13T16:19:55Z","updated_at":"2016-11-13T16:19:55Z","html_url":"https://github.com/CodingDojoDallas/python-nov-2016/pull/65#discussion_r87715509","pull_request_url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/pulls/65","_links":{"self":{"href":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/pulls/comments/87715509"},"html":{"href":"https://github.com/CodingDojoDallas/python-nov-2016/pull/65#discussion_r87715509"},"pull_request":{"href":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/pulls/65"}}},"pull_request":{"url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/pulls/65","id":93460818,"html_url":"https://github.com/CodingDojoDallas/python-nov-2016/pull/65","diff_url":"https://github.com/CodingDojoDallas/python-nov-2016/pull/65.diff","patch_url":"https://github.com/CodingDojoDallas/python-nov-2016/pull/65.patch","issue_url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/issues/65","number":65,"state":"open","locked":false,"title":"Disappearing Ninja Turtles Django","user":{"login":"Stargirl10025","id":16904543,"avatar_url":"https://avatars.githubusercontent.com/u/16904543?v=3","gravatar_id":"","url":"https://api.github.com/users/Stargirl10025","html_url":"https://github.com/Stargirl10025","followers_url":"https://api.github.com/users/Stargirl10025/followers","following_url":"https://api.github.com/users/Stargirl10025/following{/other_user}","gists_url":"https://api.github.com/users/Stargirl10025/gists{/gist_id}","starred_url":"https://api.github.com/users/Stargirl10025/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stargirl10025/subscriptions","organizations_url":"https://api.github.com/users/Stargirl10025/orgs","repos_url":"https://api.github.com/users/Stargirl10025/repos","events_url":"https://api.github.com/users/Stargirl10025/events{/privacy}","received_events_url":"https://api.github.com/users/Stargirl10025/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-11-13T03:26:19Z","updated_at":"2016-11-13T16:19:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e7f90e100f3beb770ec878d5e169ef2c20ca2371","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/pulls/65/commits","review_comments_url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/pulls/65/comments","review_comment_url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/issues/65/comments","statuses_url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/statuses/4f80ed847a1f12c8ebb7bfbedf50d239a56a9b3a","head":{"label":"Stargirl10025:MonicaHenderson_Nov12","ref":"MonicaHenderson_Nov12","sha":"4f80ed847a1f12c8ebb7bfbedf50d239a56a9b3a","user":{"login":"Stargirl10025","id":16904543,"avatar_url":"https://avatars.githubusercontent.com/u/16904543?v=3","gravatar_id":"","url":"https://api.github.com/users/Stargirl10025","html_url":"https://github.com/Stargirl10025","followers_url":"https://api.github.com/users/Stargirl10025/followers","following_url":"https://api.github.com/users/Stargirl10025/following{/other_user}","gists_url":"https://api.github.com/users/Stargirl10025/gists{/gist_id}","starred_url":"https://api.github.com/users/Stargirl10025/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stargirl10025/subscriptions","organizations_url":"https://api.github.com/users/Stargirl10025/orgs","repos_url":"https://api.github.com/users/Stargirl10025/repos","events_url":"https://api.github.com/users/Stargirl10025/events{/privacy}","received_events_url":"https://api.github.com/users/Stargirl10025/received_events","type":"User","site_admin":false},"repo":{"id":72467464,"name":"python-nov-2016","full_name":"Stargirl10025/python-nov-2016","owner":{"login":"Stargirl10025","id":16904543,"avatar_url":"https://avatars.githubusercontent.com/u/16904543?v=3","gravatar_id":"","url":"https://api.github.com/users/Stargirl10025","html_url":"https://github.com/Stargirl10025","followers_url":"https://api.github.com/users/Stargirl10025/followers","following_url":"https://api.github.com/users/Stargirl10025/following{/other_user}","gists_url":"https://api.github.com/users/Stargirl10025/gists{/gist_id}","starred_url":"https://api.github.com/users/Stargirl10025/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stargirl10025/subscriptions","organizations_url":"https://api.github.com/users/Stargirl10025/orgs","repos_url":"https://api.github.com/users/Stargirl10025/repos","events_url":"https://api.github.com/users/Stargirl10025/events{/privacy}","received_events_url":"https://api.github.com/users/Stargirl10025/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Stargirl10025/python-nov-2016","description":null,"fork":true,"url":"https://api.github.com/repos/Stargirl10025/python-nov-2016","forks_url":"https://api.github.com/repos/Stargirl10025/python-nov-2016/forks","keys_url":"https://api.github.com/repos/Stargirl10025/python-nov-2016/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Stargirl10025/python-nov-2016/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Stargirl10025/python-nov-2016/teams","hooks_url":"https://api.github.com/repos/Stargirl10025/python-nov-2016/hooks","issue_events_url":"https://api.github.com/repos/Stargirl10025/python-nov-2016/issues/events{/number}","events_url":"https://api.github.com/repos/Stargirl10025/python-nov-2016/events","assignees_url":"https://api.github.com/repos/Stargirl10025/python-nov-2016/assignees{/user}","branches_url":"https://api.github.com/repos/Stargirl10025/python-nov-2016/branches{/branch}","tags_url":"https://api.github.com/repos/Stargirl10025/python-nov-2016/tags","blobs_url":"https://api.github.com/repos/Stargirl10025/python-nov-2016/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Stargirl10025/python-nov-2016/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Stargirl10025/python-nov-2016/git/refs{/sha}","trees_url":"https://api.github.com/repos/Stargirl10025/python-nov-2016/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Stargirl10025/python-nov-2016/statuses/{sha}","languages_url":"https://api.github.com/repos/Stargirl10025/python-nov-2016/languages","stargazers_url":"https://api.github.com/repos/Stargirl10025/python-nov-2016/stargazers","contributors_url":"https://api.github.com/repos/Stargirl10025/python-nov-2016/contributors","subscribers_url":"https://api.github.com/repos/Stargirl10025/python-nov-2016/subscribers","subscription_url":"https://api.github.com/repos/Stargirl10025/python-nov-2016/subscription","commits_url":"https://api.github.com/repos/Stargirl10025/python-nov-2016/commits{/sha}","git_commits_url":"https://api.github.com/repos/Stargirl10025/python-nov-2016/git/commits{/sha}","comments_url":"https://api.github.com/repos/Stargirl10025/python-nov-2016/comments{/number}","issue_comment_url":"https://api.github.com/repos/Stargirl10025/python-nov-2016/issues/comments{/number}","contents_url":"https://api.github.com/repos/Stargirl10025/python-nov-2016/contents/{+path}","compare_url":"https://api.github.com/repos/Stargirl10025/python-nov-2016/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Stargirl10025/python-nov-2016/merges","archive_url":"https://api.github.com/repos/Stargirl10025/python-nov-2016/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Stargirl10025/python-nov-2016/downloads","issues_url":"https://api.github.com/repos/Stargirl10025/python-nov-2016/issues{/number}","pulls_url":"https://api.github.com/repos/Stargirl10025/python-nov-2016/pulls{/number}","milestones_url":"https://api.github.com/repos/Stargirl10025/python-nov-2016/milestones{/number}","notifications_url":"https://api.github.com/repos/Stargirl10025/python-nov-2016/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Stargirl10025/python-nov-2016/labels{/name}","releases_url":"https://api.github.com/repos/Stargirl10025/python-nov-2016/releases{/id}","deployments_url":"https://api.github.com/repos/Stargirl10025/python-nov-2016/deployments","created_at":"2016-10-31T18:45:28Z","updated_at":"2016-10-31T16:07:05Z","pushed_at":"2016-11-13T03:25:06Z","git_url":"git://github.com/Stargirl10025/python-nov-2016.git","ssh_url":"git@github.com:Stargirl10025/python-nov-2016.git","clone_url":"https://github.com/Stargirl10025/python-nov-2016.git","svn_url":"https://github.com/Stargirl10025/python-nov-2016","homepage":null,"size":842,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"CodingDojoDallas:master","ref":"master","sha":"c1516ed252d63c5cded1d46dda6f1f0793980996","user":{"login":"CodingDojoDallas","id":22032006,"avatar_url":"https://avatars.githubusercontent.com/u/22032006?v=3","gravatar_id":"","url":"https://api.github.com/users/CodingDojoDallas","html_url":"https://github.com/CodingDojoDallas","followers_url":"https://api.github.com/users/CodingDojoDallas/followers","following_url":"https://api.github.com/users/CodingDojoDallas/following{/other_user}","gists_url":"https://api.github.com/users/CodingDojoDallas/gists{/gist_id}","starred_url":"https://api.github.com/users/CodingDojoDallas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CodingDojoDallas/subscriptions","organizations_url":"https://api.github.com/users/CodingDojoDallas/orgs","repos_url":"https://api.github.com/users/CodingDojoDallas/repos","events_url":"https://api.github.com/users/CodingDojoDallas/events{/privacy}","received_events_url":"https://api.github.com/users/CodingDojoDallas/received_events","type":"Organization","site_admin":false},"repo":{"id":72453587,"name":"python-nov-2016","full_name":"CodingDojoDallas/python-nov-2016","owner":{"login":"CodingDojoDallas","id":22032006,"avatar_url":"https://avatars.githubusercontent.com/u/22032006?v=3","gravatar_id":"","url":"https://api.github.com/users/CodingDojoDallas","html_url":"https://github.com/CodingDojoDallas","followers_url":"https://api.github.com/users/CodingDojoDallas/followers","following_url":"https://api.github.com/users/CodingDojoDallas/following{/other_user}","gists_url":"https://api.github.com/users/CodingDojoDallas/gists{/gist_id}","starred_url":"https://api.github.com/users/CodingDojoDallas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CodingDojoDallas/subscriptions","organizations_url":"https://api.github.com/users/CodingDojoDallas/orgs","repos_url":"https://api.github.com/users/CodingDojoDallas/repos","events_url":"https://api.github.com/users/CodingDojoDallas/events{/privacy}","received_events_url":"https://api.github.com/users/CodingDojoDallas/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CodingDojoDallas/python-nov-2016","description":null,"fork":false,"url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016","forks_url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/forks","keys_url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/teams","hooks_url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/hooks","issue_events_url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/issues/events{/number}","events_url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/events","assignees_url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/assignees{/user}","branches_url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/branches{/branch}","tags_url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/tags","blobs_url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/git/refs{/sha}","trees_url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/statuses/{sha}","languages_url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/languages","stargazers_url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/stargazers","contributors_url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/contributors","subscribers_url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/subscribers","subscription_url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/subscription","commits_url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/commits{/sha}","git_commits_url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/git/commits{/sha}","comments_url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/comments{/number}","issue_comment_url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/issues/comments{/number}","contents_url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/contents/{+path}","compare_url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/merges","archive_url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/downloads","issues_url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/issues{/number}","pulls_url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/pulls{/number}","milestones_url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/milestones{/number}","notifications_url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/labels{/name}","releases_url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/releases{/id}","deployments_url":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/deployments","created_at":"2016-10-31T16:07:05Z","updated_at":"2016-11-03T19:08:45Z","pushed_at":"2016-11-13T03:26:19Z","git_url":"git://github.com/CodingDojoDallas/python-nov-2016.git","ssh_url":"git@github.com:CodingDojoDallas/python-nov-2016.git","clone_url":"https://github.com/CodingDojoDallas/python-nov-2016.git","svn_url":"https://github.com/CodingDojoDallas/python-nov-2016","homepage":null,"size":851,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":5,"forks":11,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/pulls/65"},"html":{"href":"https://github.com/CodingDojoDallas/python-nov-2016/pull/65"},"issue":{"href":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/issues/65"},"comments":{"href":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/issues/65/comments"},"review_comments":{"href":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/pulls/65/comments"},"review_comment":{"href":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/pulls/65/commits"},"statuses":{"href":"https://api.github.com/repos/CodingDojoDallas/python-nov-2016/statuses/4f80ed847a1f12c8ebb7bfbedf50d239a56a9b3a"}}}}
{"actor":{"display_login":"chrisulanowicz"}}