diff --git a/app.py b/app.py index 2ca8e91..2bf9922 100644 --- a/app.py +++ b/app.py @@ -633,7 +633,9 @@ def create_app(config_object="config"): def device_list(): devices = db.query(Device).order_by(Device.name).all() device_types = sorted({d.device_type for d in devices if d.device_type}) - return render_template("device_list.html", devices=devices, device_types=device_types) + device_locations = sorted({d.location for d in devices if d.location}) + return render_template("device_list.html", devices=devices, + device_types=device_types, device_locations=device_locations) # ------------------------------------------------------------------ # # Devices — add diff --git a/templates/device_list.html b/templates/device_list.html index 49ef61c..6e6d84e 100644 --- a/templates/device_list.html +++ b/templates/device_list.html @@ -13,6 +13,20 @@ {% endfor %} + +