Commits

a2c  committed ce04ed0

html修正

  • Participants
  • Parent commits 590ffca

Comments (0)

Files changed (1)

File flask_main.py

         type: "GET", 
         url: req_url, 
         success: function(json){
-          $("#result").html(json);
+          if(json!='fail'){
+            $("#result").html('グループ:' + json);
+          }else{
+            $("#result").html('グループ外');
+          }
           }
         });
     });
   });
   </script>
+  <style>
+  body{
+    font-size: 2em;
+  }
+  input{
+    font-size: 1.4em;
+  }
+
+  </style>
   </head>
   <body>
-  町名:<input type='text' id='town_name'/>
+  <div id='description'>地名(町名または大字)漢字で入れてください</div>
+  町名:<input type='text' size=8 id='town_name'/>
   <button id='search'>Search</button>
   <div id='result'></div>
-  <div id='description'>最小単位の地名を入れてください</div>
   </body></html>
   '''
   return html
 def get_id(key):
   r = redis.Redis(host='localhost', port=6379, db=0)
   res = r.get(key)
-  return res
+  if res:
+    return res
+  else:
+     return 'fail'
 
 
 # Utility ============================================