Преглед изворни кода

Added revised quandl example and facebook link to api examples.

Marco Quezada пре 10 година
родитељ
комит
a07086d5e7

+ 1 - 0
hackathon_starter/hackathon/templates/hackathon/api_examples.html

@@ -18,6 +18,7 @@
 		<div class="col-sm-4"><a href="http://localhost:8000/hackathon/meetupUser/">Meetup</a></div>
 		<div class="col-sm-4"><a href="http://localhost:8000/hackathon/yelp/">Yelp</a></div>
 		<div class="col-sm-4"><a href="http://127.0.0.1:8000/hackathon/nytimesarticles/">New York Times</a></div>
+        <div class="col-sm-4"><a href="http://127.0.0.1:8000/hackathon/facebook/">Facebook JDK Exmaple</a></div>
 
   	</div>
 

+ 43 - 40
hackathon_starter/hackathon/templates/hackathon/quandl.html

@@ -3,81 +3,84 @@
 <body>
 	{% include 'hackathon/base.html' %}
 
-    <h1 class="text-center"> Quandl Collection </h1>
-    <h2 class="text-center"> Dow Jones Data </h2>
-	<div class="col-lg-12">
+<h1 class="text-center"> Quandl Collection </h1>
+    <h2 class="text-center"> Index Data </h2>
+    <div class="col-lg-12">
         <div class="table-responsive">
             <table class="table table-bordered table-hover table-striped tablesorter">
                 <thead>
                 <tr>
                 <th class="header"> Name <i class="icon-sort"></i></th>
-                <th class="header"> Description <i class="icon-sort"></i></th>
+                <th class="header"> Code <i class="icon-sort"></i></th>
                 <th class="header"> Data <i class="icon-sort"></i></th>
-                <th class="header"> Code <i class="icon-sort"></i></th>  
+                <th class="header"> Change <i class="icon-sort"></i></th> 
                 </tr>
             </thead>
             <tbody>
-
+            <tr>
             {% for data in everyData.dow %}
-                <tr>
                     <td>{{ data.name }}</td>
-                    <td>{{ data.description }}</td>
-                    <td>{{ data.data }}</td>
                     <td>{{ data.code }}</td>
-                </tr>
+                    <td>{{ data.data }}</td>
+            {% endfor %}
+            {% for data in everyData.dowdiff %}
+                    <td>{{ data.rdiff }}</td>
             {% endfor %}
-            </tbody>
-            </table>
-        </div>
-    </div>
-    <h2 class="text-center"> SnP 500 Data </h2>
-    <div class="col-lg-12">
-        <div class="table-responsive">
-            <table class="table table-bordered table-hover table-striped tablesorter">
-                <thead>
-                <tr>
-                <th class="header"> Name <i class="icon-sort"></i></th>
-                <th class="header"> Description <i class="icon-sort"></i></th>
-                <th class="header"> Data <i class="icon-sort"></i></th>
-                <th class="header"> Code <i class="icon-sort"></i></th>  
                 </tr>
-            </thead>
-            <tbody>
-
-            {% for data in everyData.snp %}
                 <tr>
+            {% for data in everyData.snp %}
                     <td>{{ data.name }}</td>
-                    <td>{{ data.description }}</td>
-                    <td>{{ data.data }}</td>
                     <td>{{ data.code }}</td>
+                    <td>{{ data.data }}</td>
+            {% endfor %}
+            {% for data in everyData.snpdiff %}
+                    <td>{{ data.rdiff }}</td>
+            {% endfor %}
                 </tr>
+                <tr>
+            {% for data in everyData.nasdaq %}
+                    <td>{{ data.name }}</td>
+                    <td>{{ data.code }}</td>
+                    <td>{{ data.data }}</td>
+            {% endfor %}
+            {% for data in everyData.nasdaqdiff %}
+                    <td>{{ data.rdiff }}</td>
             {% endfor %}
+                </tr>
             </tbody>
             </table>
         </div>
     </div>
-    <h2 class="text-center"> Nasdaq Data </h2>
+
+<h2 class="text-center"> Stock Data </h2>
     <div class="col-lg-12">
         <div class="table-responsive">
             <table class="table table-bordered table-hover table-striped tablesorter">
                 <thead>
                 <tr>
                 <th class="header"> Name <i class="icon-sort"></i></th>
-                <th class="header"> Description <i class="icon-sort"></i></th>
-                <th class="header"> Data <i class="icon-sort"></i></th>
-                <th class="header"> Code <i class="icon-sort"></i></th>  
+                <th class="header"> Code <i class="icon-sort"></i></th>
+                <th class="header"> Open <i class="icon-sort"></i></th>
+                <th class="header"> High <i class="icon-sort"></i></th>
+                <th class="header"> Low <i class="icon-sort"></i></th>
+                <th class="header"> Close <i class="icon-sort"></i></th>
+                <th class="header"> Change <i class="icon-sort"></i></th> 
                 </tr>
             </thead>
             <tbody>
-
-            {% for data in everyData.nasdaq %}
-                <tr>
+            <tr>
+            {% for data in everyData.apple %}
                     <td>{{ data.name }}</td>
-                    <td>{{ data.description }}</td>
-                    <td>{{ data.data }}</td>
                     <td>{{ data.code }}</td>
-                </tr>
+                    <td>{{ data.open }}</td>
+                    <td>{{ data.high }}</td>
+                    <td>{{ data.low }}</td>
+                    <td>{{ data.close }}</td>
             {% endfor %}
+            {% for data in everyData.applediff %}
+                    <td>{{ data.rdiff }}</td>
+            {% endfor %}
+                </tr>
             </tbody>
             </table>
         </div>