Pārlūkot izejas kodu

Updating steam.py, updating base.html

David Leonard 10 gadi atpakaļ
vecāks
revīzija
6a195ea45c

+ 12 - 7
hackathon_starter/hackathon/scripts/steam.py

@@ -1,13 +1,21 @@
+# pylint: disable=C0303
+
 import requests
 import json
-SteamUN = "Marorin"
 
+SteamUN = "Marorin"
 key = '231E98D442E52B87110816C3D5114A1D'
 
 def gamesPulling(steamID,key):
-    # Returns the JSON data from the Steam API based of one's Steam ID number and returns a dictionary of gameids and minutes played.
-    steaminfo = {'key': key, 'steamid': steamID,'format':'JSON','include_appinfo':'1'}
-    r = requests.get('http://api.steampowered.com/IPlayerService/GetOwnedGames/v0001/', params=steaminfo)  
+    # Returns the JSON data from the Steam API based of one's 
+    # Steam ID number and returns a dictionary of gameids and minutes played.
+    steaminfo = {
+        'key': key, 
+        'steamid': steamID,
+        'format':'JSON',
+        'include_appinfo':'1'
+    }
+    r = requests.get('http://api.steampowered.com/IPlayerService/GetOwnedGames/v0001/', params=steaminfo)
     d = json.loads(r.content)
     return d['response']['games']
  
@@ -19,6 +27,3 @@ def steamIDPulling(SteamUN,key):
     SteamID = k['response']['steamid']
     
     return SteamID
-# steampulling(steamID)
-steamID = steamIDPulling(SteamUN, key)
-gamesPulling(steamID,key)

+ 12 - 11
hackathon_starter/hackathon/templates/hackathon/base.html

@@ -1,14 +1,14 @@
 <!DOCTYPE html>
-  <html lang="en">
-    <head>
-      <title> Django Hackathon Starter </title>
-      <script src="/static/bower_components/jquery/dist/jquery.js"></script>
-      <script type="text/javascript" src="/static/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
-      
-      
-      <link rel="stylesheet" href="/static/bower_components/bootstrap/dist/css/bootstrap.min.css">
-      <link rel="stylesheet" href="/static/bower_components/bootstrap/dist/css/bootstrap-theme.min.css">
-    </head>
+<html lang="en">
+  <head>
+    <title> Django Hackathon Starter </title>
+    <script src="/static/bower_components/jquery/dist/jquery.js"></script>
+    <script type="text/javascript" src="/static/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
+    
+    
+    <link rel="stylesheet" href="/static/bower_components/bootstrap/dist/css/bootstrap.min.css">
+    <link rel="stylesheet" href="/static/bower_components/bootstrap/dist/css/bootstrap-theme.min.css">
+  </head>
     
   <body>
     <nav class="navbar navbar-default" role="navigation">
@@ -54,4 +54,5 @@
         </div><!-- /.navbar-collapse -->
       </div><!-- /.container-fluid -->
     </nav>
-  </body>
+  </body>
+</html>