瀏覽代碼

Removing images from api_examples template, adding JSONResponse comment for Github view

David Leonard 10 年之前
父節點
當前提交
28729d24d6

+ 4 - 5
hackathon_starter/hackathon/templates/hackathon/api_examples.html

@@ -4,11 +4,10 @@
 
 
 	<div class="row text-center">
-	    <div class="col-sm-4"><a href="http://127.0.0.1:8000/hackathon/github/"><img src="/static/img/github.png"></a></div>
-	    <div class="col-sm-4"><a href="http://127.0.0.1:8000/hackathon/steam/"><img src="/static/img/steam.png"></a></div>
-	    <div class="col-sm-4"><img src="/static/img/github.png"></div>
-	    <div class="col-sm-4"><a href={{tumblr_url}}><img src="/static/img/tumblr.png"></a></div>
-		<div class="col-sm-4"><a href="http://127.0.0.1:8000/hackathon/linkedin/"><img src="/static/img/linkedin.jpg"></a></div>
+	    <div class="col-sm-4"><a href="http://127.0.0.1:8000/hackathon/github/">Github Example</a></div>
+	    <div class="col-sm-4"><a href="http://127.0.0.1:8000/hackathon/steam/">Steam Example</a></div>
+	    <div class="col-sm-4"><a href={{tumblr_url}}>Tumblr Example</a></div>
+		<div class="col-sm-4"><a href="http://127.0.0.1:8000/hackathon/linkedin/">LinkedIn Example</a></div>
 
   	</div>
 

+ 2 - 1
hackathon_starter/hackathon/views.py

@@ -9,6 +9,7 @@ from django.contrib.auth import authenticate, login, logout
 from django.contrib.auth.models import User
 from django.contrib.auth.decorators import login_required
 from django.views.decorators.csrf import csrf_exempt
+from django.http import JsonResponse
 
 # Scripts
 from scripts.steam import gamesPulling, steamIDPulling 
@@ -108,7 +109,7 @@ def github(request):
     allData['filteredData'] = filtered
     allData['filteredStargazers'] = filteredStargazers
     allData['forkedRepos'] = forkedRepos
-
+    # return JsonResponse({'data': allData});
     return render(request, 'hackathon/github.html', { 'data': allData })
 
 def tumblr(request):