aboutsummaryrefslogtreecommitdiff
path: root/src/shop_map_node5_net.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/shop_map_node5_net.py')
-rw-r--r--src/shop_map_node5_net.py23
1 files changed, 7 insertions, 16 deletions
diff --git a/src/shop_map_node5_net.py b/src/shop_map_node5_net.py
index 8ab97bc..3898e21 100644
--- a/src/shop_map_node5_net.py
+++ b/src/shop_map_node5_net.py
@@ -10,7 +10,7 @@ app = flask.Flask(__name__, template_folder='templates', static_folder='static',
@app.route("/")
def index():
- return flask.redirect('/index.html')
+ return flask.render_template('/index.html')
@app.route("/chains")
@@ -27,24 +27,15 @@ def chains():
return json.dumps(color_by_name)
-@app.route("/stores.json")
-def stores():
- return db_handler.get_stores()
-
-
-@app.route("/supermarkets.json")
-def supermarkets():
- return db_handler.get_supermarkets()
-
-
-@app.route("/voronoi_polygons.json")
-def voronoi_polygons():
- d = db_handler.voronoi_polygons()
-
+@app.route("/categories")
+def categories():
+ categories = db_handler.categories
+ return categories
@app.route("/all.json")
def all():
- rows = db_handler.get_all()
+ category_RADIOACTIVE = flask.request.args.get('Category') # User input is RADIOACTIVE
+ rows = db_handler.get_all(category_RADIOACTIVE)
for row in rows:
coordinates = []
for coordinate in json.loads(row['polygon'])['coordinates'][0]: