diff --git a/dummy_data.py b/dummy_data.py index 1796031..f8a1626 100644 --- a/dummy_data.py +++ b/dummy_data.py @@ -105,7 +105,7 @@ def populate_data(Users, Events): Users.add_user( id=239842123, - name="Remy", + name="Clara", event_preferences=["hiking","skiing"], event_blacklist = [], home_coordinates=[0,0], diff --git a/models/event.py b/models/event.py index dca2562..c9868dd 100644 --- a/models/event.py +++ b/models/event.py @@ -8,7 +8,7 @@ class Event: description = "" reviews = [] category = [] - weather_requirements = 0 + weather_requirements = 100 # highest tolerance date = "" image_path = "fallback.jpg" activity_duration = "" # datetime object @@ -87,4 +87,15 @@ class Events: return None def __iter__(self): - return iter(self._events) \ No newline at end of file + # todo fix broken iterator + return iter(self._events) + + + def filter_events(self, user, weather_score): + # implement user preferences, geographic restrictions and weather conditions + + for e in self._events: + if e.weather_requirements <= weather_score \ + or abs(e.location_coordinates[0] - user.home_coordinates[0]) + abs(e.location_coordinates[1] - user.home_coordinates[1]) >= 15 \ + or not e.trip_is_good: + print("This event should be removed") diff --git a/server.py b/server.py index 401f2b9..04952f3 100644 --- a/server.py +++ b/server.py @@ -24,12 +24,18 @@ app.secret_key = 'A0Zr98j/3yX R~XHH!jmN]LWX/,?RT' @app.route("/") def index(): session["user_id"] = 239842123 # a perfectly safe login, hem hem + user = USERBASE.get_by_id(session["user_id"]) wscore = WEATHERCALCULATOR.calc_weather_score(EVENTBASE.get_by_id(1)) wscore = 10 # hard coded for positive pitch experience weather_icon = ["☀️","🌥️","🌧️","⛈️"][int(wscore/25)] weather_string = ["looks great!", "could be better..."][int(wscore/50)] + + + EVENTBASE.filter_events(user, wscore) + + context = { - "user" : USERBASE.get_by_id(session["user_id"]).name, + "user" : user.name, "weather_emoji" : weather_icon, "weather_string" : weather_string } @@ -57,7 +63,7 @@ def profile(): colorway=["#D50505", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd", "#8c564b", "#e377c2", "#7f7f7f", "#bcbd22", "#17becf"] ) fig.update_yaxes( - title_text = "g of CO2 saved", + title_text = "Kg of CO2 saved", title_standoff = 5) fig.add_trace(go.Bar(x=days, y=co2_savings)) plot_div = plot(fig, output_type='div', include_plotlyjs=False) @@ -99,14 +105,6 @@ def event_booked_view(event_id): abort(404) - -@app.template_filter('strftime') -def _jinja2_filter_datetime(date, fmt=None): - date = dateutil.parser.parse(date) - native = date.replace(tzinfo=None) - format='%b %d, %Y' - return native.strftime(format) - ############################# ## And, liftoff! app.run(host="0.0.0.0",port=8000, debug=True) \ No newline at end of file diff --git a/static/travelhistorymap_customer239842123.html b/static/travelhistorymap_customer239842123.html index 9e00f13..4fe0346 100644 --- a/static/travelhistorymap_customer239842123.html +++ b/static/travelhistorymap_customer239842123.html @@ -23,7 +23,7 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> <style> - #map_4d5df68455c74bc8b919c511fe0315a2 { + #map_4ad202413cfd4f70960e2606f3270a7e { position: relative; width: 100.0%; height: 100.0%; @@ -35,13 +35,13 @@ </head> <body> - <div class="folium-map" id="map_4d5df68455c74bc8b919c511fe0315a2" ></div> + <div class="folium-map" id="map_4ad202413cfd4f70960e2606f3270a7e" ></div> </body> <script> - var map_4d5df68455c74bc8b919c511fe0315a2 = L.map( - "map_4d5df68455c74bc8b919c511fe0315a2", + var map_4ad202413cfd4f70960e2606f3270a7e = L.map( + "map_4ad202413cfd4f70960e2606f3270a7e", { center: [46.8132, 8.2242], crs: L.CRS.EPSG3857, @@ -55,307 +55,132 @@ - var tile_layer_12367b4532a240e9a717454c38245125 = L.tileLayer( + var tile_layer_7efc83faa3f945fb8c94ffe546d0440c = L.tileLayer( "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", {"attribution": "Data by \u0026copy; \u003ca href=\"http://openstreetmap.org\"\u003eOpenStreetMap\u003c/a\u003e, under \u003ca href=\"http://www.openstreetmap.org/copyright\"\u003eODbL\u003c/a\u003e.", "detectRetina": false, "maxNativeZoom": 12, "maxZoom": 12, "minZoom": 6, "noWrap": false, "opacity": 1, "subdomains": "abc", "tms": false} - ).addTo(map_4d5df68455c74bc8b919c511fe0315a2); + ).addTo(map_4ad202413cfd4f70960e2606f3270a7e); - var marker_82229e2776bc4647a32265915f1486ad = L.marker( + var marker_63e4582038a24be8b17719a9cab672aa = L.marker( [46.3667, 7.445683], {} - ).addTo(map_4d5df68455c74bc8b919c511fe0315a2); + ).addTo(map_4ad202413cfd4f70960e2606f3270a7e); - var icon_09207b8ad7034525b6060d75de8bd0de = L.AwesomeMarkers.icon( + var icon_b38470a9a4e54d6a9f1f15a2db9082ef = L.AwesomeMarkers.icon( {"extraClasses": "fa-rotate-0", "icon": "info-sign", "iconColor": "white", "markerColor": "red", "prefix": "glyphicon"} ); - marker_82229e2776bc4647a32265915f1486ad.setIcon(icon_09207b8ad7034525b6060d75de8bd0de); + marker_63e4582038a24be8b17719a9cab672aa.setIcon(icon_b38470a9a4e54d6a9f1f15a2db9082ef); - var popup_a783967e974c42d68166b691cb1fff49 = L.popup({"maxWidth": "100%"}); + var popup_0f5b923101a449df89cdf1e4374d7d15 = L.popup({"maxWidth": "100%"}); - var html_c23dc87478e94114a9a71ff0b2ec63a8 = $(`<div id="html_c23dc87478e94114a9a71ff0b2ec63a8" style="width: 100.0%; height: 100.0%;">SPH Zentrum, Zürich</div>`)[0]; - popup_a783967e974c42d68166b691cb1fff49.setContent(html_c23dc87478e94114a9a71ff0b2ec63a8); + var html_f16aa93204d44d6092f92fd18b124dc9 = $(`<div id="html_f16aa93204d44d6092f92fd18b124dc9" style="width: 100.0%; height: 100.0%;">SPH Zentrum, Zürich</div>`)[0]; + popup_0f5b923101a449df89cdf1e4374d7d15.setContent(html_f16aa93204d44d6092f92fd18b124dc9); - marker_82229e2776bc4647a32265915f1486ad.bindPopup(popup_a783967e974c42d68166b691cb1fff49) + marker_63e4582038a24be8b17719a9cab672aa.bindPopup(popup_0f5b923101a449df89cdf1e4374d7d15) ; - var marker_b3fadfa7839f4f09a350dd0859f618f1 = L.marker( + var marker_7a328509eca046f4a3211d2553562efb = L.marker( [46.368, 7.445683], {} - ).addTo(map_4d5df68455c74bc8b919c511fe0315a2); + ).addTo(map_4ad202413cfd4f70960e2606f3270a7e); - var icon_404529ceac4c4c908c48b69e0f85380f = L.AwesomeMarkers.icon( + var icon_94d3967ec1bc4d258ccf29af96a1d5ed = L.AwesomeMarkers.icon( {"extraClasses": "fa-rotate-0", "icon": "info-sign", "iconColor": "white", "markerColor": "red", "prefix": "glyphicon"} ); - marker_b3fadfa7839f4f09a350dd0859f618f1.setIcon(icon_404529ceac4c4c908c48b69e0f85380f); + marker_7a328509eca046f4a3211d2553562efb.setIcon(icon_94d3967ec1bc4d258ccf29af96a1d5ed); - var popup_4208e9abf8804d5a9acb3c6108ea101e = L.popup({"maxWidth": "100%"}); + var popup_42aa3e55e1344c6f8967b861b8781521 = L.popup({"maxWidth": "100%"}); - var html_82a9a17bf26b4dce94be31965aa2059a = $(`<div id="html_82a9a17bf26b4dce94be31965aa2059a" style="width: 100.0%; height: 100.0%;">Zürich</div>`)[0]; - popup_4208e9abf8804d5a9acb3c6108ea101e.setContent(html_82a9a17bf26b4dce94be31965aa2059a); + var html_d7fee66ebbbd46cfa0ad04c1c6cf7774 = $(`<div id="html_d7fee66ebbbd46cfa0ad04c1c6cf7774" style="width: 100.0%; height: 100.0%;">Zürich</div>`)[0]; + popup_42aa3e55e1344c6f8967b861b8781521.setContent(html_d7fee66ebbbd46cfa0ad04c1c6cf7774); - marker_b3fadfa7839f4f09a350dd0859f618f1.bindPopup(popup_4208e9abf8804d5a9acb3c6108ea101e) + marker_7a328509eca046f4a3211d2553562efb.bindPopup(popup_42aa3e55e1344c6f8967b861b8781521) ; - var marker_38a3a159aa414767b4036e075342b970 = L.marker( + var marker_1b722a3f09884394b034e59184a7d949 = L.marker( [46.68387, 7.86638], {} - ).addTo(map_4d5df68455c74bc8b919c511fe0315a2); + ).addTo(map_4ad202413cfd4f70960e2606f3270a7e); - var icon_aa5a069372ff451d914043f24e9cbeb7 = L.AwesomeMarkers.icon( + var icon_0f9a2f6efeeb427f9c2190c9e55f259f = L.AwesomeMarkers.icon( {"extraClasses": "fa-rotate-0", "icon": "info-sign", "iconColor": "white", "markerColor": "red", "prefix": "glyphicon"} ); - marker_38a3a159aa414767b4036e075342b970.setIcon(icon_aa5a069372ff451d914043f24e9cbeb7); + marker_1b722a3f09884394b034e59184a7d949.setIcon(icon_0f9a2f6efeeb427f9c2190c9e55f259f); - var popup_bebb049091a94d70adca4ccf4f4e225a = L.popup({"maxWidth": "100%"}); + var popup_e81454914e8f4c0bada892120b76a18d = L.popup({"maxWidth": "100%"}); - var html_e559a37a7dac4c359e71b00c8538a424 = $(`<div id="html_e559a37a7dac4c359e71b00c8538a424" style="width: 100.0%; height: 100.0%;">Interlaken</div>`)[0]; - popup_bebb049091a94d70adca4ccf4f4e225a.setContent(html_e559a37a7dac4c359e71b00c8538a424); + var html_2793c015795542bc882a52502e0fb6f9 = $(`<div id="html_2793c015795542bc882a52502e0fb6f9" style="width: 100.0%; height: 100.0%;">Interlaken</div>`)[0]; + popup_e81454914e8f4c0bada892120b76a18d.setContent(html_2793c015795542bc882a52502e0fb6f9); - marker_38a3a159aa414767b4036e075342b970.bindPopup(popup_bebb049091a94d70adca4ccf4f4e225a) + marker_1b722a3f09884394b034e59184a7d949.bindPopup(popup_e81454914e8f4c0bada892120b76a18d) ; - var marker_df78cd9ce01e479e96b779c90faef9aa = L.marker( + var marker_5974b9f08b22457ebb879235d3e2eb4e = L.marker( [46.01008, 8.96004], {} - ).addTo(map_4d5df68455c74bc8b919c511fe0315a2); + ).addTo(map_4ad202413cfd4f70960e2606f3270a7e); - var icon_c96d91cae58d4079b30cd218527bb027 = L.AwesomeMarkers.icon( + var icon_aa735f681c0043cbbadec5f646a531ba = L.AwesomeMarkers.icon( {"extraClasses": "fa-rotate-0", "icon": "info-sign", "iconColor": "white", "markerColor": "red", "prefix": "glyphicon"} ); - marker_df78cd9ce01e479e96b779c90faef9aa.setIcon(icon_c96d91cae58d4079b30cd218527bb027); + marker_5974b9f08b22457ebb879235d3e2eb4e.setIcon(icon_aa735f681c0043cbbadec5f646a531ba); - var popup_a70fd0ac8200477fa86aaee76c56ea65 = L.popup({"maxWidth": "100%"}); + var popup_897ba8fded454fb2af9864ea13666024 = L.popup({"maxWidth": "100%"}); - var html_7009edcb711246879165609a925455de = $(`<div id="html_7009edcb711246879165609a925455de" style="width: 100.0%; height: 100.0%;">Lugano</div>`)[0]; - popup_a70fd0ac8200477fa86aaee76c56ea65.setContent(html_7009edcb711246879165609a925455de); + var html_fe81e56fd6924ff0a956378d708c7440 = $(`<div id="html_fe81e56fd6924ff0a956378d708c7440" style="width: 100.0%; height: 100.0%;">Lugano</div>`)[0]; + popup_897ba8fded454fb2af9864ea13666024.setContent(html_fe81e56fd6924ff0a956378d708c7440); - marker_df78cd9ce01e479e96b779c90faef9aa.bindPopup(popup_a70fd0ac8200477fa86aaee76c56ea65) + marker_5974b9f08b22457ebb879235d3e2eb4e.bindPopup(popup_897ba8fded454fb2af9864ea13666024) ; - var marker_3c3dea74d4464f3f8b47cfc19c23d2c8 = L.marker( + var marker_01baaf082c3840d3827fb8f5c0f78e0c = L.marker( [47.05048, 8.30635], {} - ).addTo(map_4d5df68455c74bc8b919c511fe0315a2); + ).addTo(map_4ad202413cfd4f70960e2606f3270a7e); - var icon_855beba2b2a6452bb069c6aea988266d = L.AwesomeMarkers.icon( + var icon_15183ddbd90f42bda9a5a70630038b9e = L.AwesomeMarkers.icon( {"extraClasses": "fa-rotate-0", "icon": "info-sign", "iconColor": "white", "markerColor": "red", "prefix": "glyphicon"} ); - marker_3c3dea74d4464f3f8b47cfc19c23d2c8.setIcon(icon_855beba2b2a6452bb069c6aea988266d); + marker_01baaf082c3840d3827fb8f5c0f78e0c.setIcon(icon_15183ddbd90f42bda9a5a70630038b9e); - var popup_f97c6caf790d46329a75b8bdf3a1ef01 = L.popup({"maxWidth": "100%"}); + var popup_a09fa7e090d14e21bfa1c1c0def90c9b = L.popup({"maxWidth": "100%"}); - var html_40e0a29e89e245debe35053aaab163c2 = $(`<div id="html_40e0a29e89e245debe35053aaab163c2" style="width: 100.0%; height: 100.0%;">Lucerne</div>`)[0]; - popup_f97c6caf790d46329a75b8bdf3a1ef01.setContent(html_40e0a29e89e245debe35053aaab163c2); + var html_bfc6eb61dc4b406a913fd2b16ce4b65b = $(`<div id="html_bfc6eb61dc4b406a913fd2b16ce4b65b" style="width: 100.0%; height: 100.0%;">Lucerne</div>`)[0]; + popup_a09fa7e090d14e21bfa1c1c0def90c9b.setContent(html_bfc6eb61dc4b406a913fd2b16ce4b65b); - marker_3c3dea74d4464f3f8b47cfc19c23d2c8.bindPopup(popup_f97c6caf790d46329a75b8bdf3a1ef01) - ; - - - - - var marker_856b59e8d3d84cbab0a3a5793f504616 = L.marker( - [46.492331364, 7.722830442], - {} - ).addTo(map_4d5df68455c74bc8b919c511fe0315a2); - - - var icon_24840121a4374c38b687eed06680dbed = L.AwesomeMarkers.icon( - {"extraClasses": "fa-rotate-0", "icon": "info-sign", "iconColor": "white", "markerColor": "red", "prefix": "glyphicon"} - ); - marker_856b59e8d3d84cbab0a3a5793f504616.setIcon(icon_24840121a4374c38b687eed06680dbed); - - - var popup_0c9e6c1b73fc4b83a06592a3048581b3 = L.popup({"maxWidth": "100%"}); - - - var html_438070f49ff3408db7d2ab3dd2d1e4f3 = $(`<div id="html_438070f49ff3408db7d2ab3dd2d1e4f3" style="width: 100.0%; height: 100.0%;">Oeschinen Lake</div>`)[0]; - popup_0c9e6c1b73fc4b83a06592a3048581b3.setContent(html_438070f49ff3408db7d2ab3dd2d1e4f3); - - - marker_856b59e8d3d84cbab0a3a5793f504616.bindPopup(popup_0c9e6c1b73fc4b83a06592a3048581b3) - ; - - - - - var marker_9870ea5a7b6341b3bee0984b4f96ace3 = L.marker( - [46.438664912, 8.072999708], - {} - ).addTo(map_4d5df68455c74bc8b919c511fe0315a2); - - - var icon_22bf71366e3146b08b0b14edd1f4f061 = L.AwesomeMarkers.icon( - {"extraClasses": "fa-rotate-0", "icon": "info-sign", "iconColor": "white", "markerColor": "red", "prefix": "glyphicon"} - ); - marker_9870ea5a7b6341b3bee0984b4f96ace3.setIcon(icon_22bf71366e3146b08b0b14edd1f4f061); - - - var popup_c69624b7285f41c9a4d5cccfe253d453 = L.popup({"maxWidth": "100%"}); - - - var html_12e374db59ae4c7ab7e755cd4f780b18 = $(`<div id="html_12e374db59ae4c7ab7e755cd4f780b18" style="width: 100.0%; height: 100.0%;">Aletschglacier</div>`)[0]; - popup_c69624b7285f41c9a4d5cccfe253d453.setContent(html_12e374db59ae4c7ab7e755cd4f780b18); - - - marker_9870ea5a7b6341b3bee0984b4f96ace3.bindPopup(popup_c69624b7285f41c9a4d5cccfe253d453) - ; - - - - - var marker_07b0515505a243e08ac8f2cd3c06b7eb = L.marker( - [46.82107, 8.40133], - {} - ).addTo(map_4d5df68455c74bc8b919c511fe0315a2); - - - var icon_91e83e658ed84823b8a2d8a3d6f96686 = L.AwesomeMarkers.icon( - {"extraClasses": "fa-rotate-0", "icon": "info-sign", "iconColor": "white", "markerColor": "red", "prefix": "glyphicon"} - ); - marker_07b0515505a243e08ac8f2cd3c06b7eb.setIcon(icon_91e83e658ed84823b8a2d8a3d6f96686); - - - var popup_b7e72ca815774549bd194053674bbdb4 = L.popup({"maxWidth": "100%"}); - - - var html_9f834551dfdc4462a4b9006ff1ea63d8 = $(`<div id="html_9f834551dfdc4462a4b9006ff1ea63d8" style="width: 100.0%; height: 100.0%;">Engelberg</div>`)[0]; - popup_b7e72ca815774549bd194053674bbdb4.setContent(html_9f834551dfdc4462a4b9006ff1ea63d8); - - - marker_07b0515505a243e08ac8f2cd3c06b7eb.bindPopup(popup_b7e72ca815774549bd194053674bbdb4) - ; - - - - - var marker_2c22ece083814334b4607b1fe484da71 = L.marker( - [46.80429, 9.83723], - {} - ).addTo(map_4d5df68455c74bc8b919c511fe0315a2); - - - var icon_471eaf30cab448688dffc57e0e880fb3 = L.AwesomeMarkers.icon( - {"extraClasses": "fa-rotate-0", "icon": "info-sign", "iconColor": "white", "markerColor": "red", "prefix": "glyphicon"} - ); - marker_2c22ece083814334b4607b1fe484da71.setIcon(icon_471eaf30cab448688dffc57e0e880fb3); - - - var popup_2b77e6f8c8064a36b67530e07b3dd7f3 = L.popup({"maxWidth": "100%"}); - - - var html_41e8ad860fa444d0ae24af12fb486dbd = $(`<div id="html_41e8ad860fa444d0ae24af12fb486dbd" style="width: 100.0%; height: 100.0%;">Davos</div>`)[0]; - popup_2b77e6f8c8064a36b67530e07b3dd7f3.setContent(html_41e8ad860fa444d0ae24af12fb486dbd); - - - marker_2c22ece083814334b4607b1fe484da71.bindPopup(popup_2b77e6f8c8064a36b67530e07b3dd7f3) - ; - - - - - var marker_a0193887dd2543a59c9c4e48ba787723 = L.marker( - [46.11654, 7.445683], - {} - ).addTo(map_4d5df68455c74bc8b919c511fe0315a2); - - - var icon_0bd08d372fe64a67a88722ad63b7d033 = L.AwesomeMarkers.icon( - {"extraClasses": "fa-rotate-0", "icon": "info-sign", "iconColor": "white", "markerColor": "red", "prefix": "glyphicon"} - ); - marker_a0193887dd2543a59c9c4e48ba787723.setIcon(icon_0bd08d372fe64a67a88722ad63b7d033); - - - var popup_548121ced5c9493787a5a8050a474b5d = L.popup({"maxWidth": "100%"}); - - - var html_ed2c1d3ac17d4966a2c6b4ad2ff687e0 = $(`<div id="html_ed2c1d3ac17d4966a2c6b4ad2ff687e0" style="width: 100.0%; height: 100.0%;">Zermatt</div>`)[0]; - popup_548121ced5c9493787a5a8050a474b5d.setContent(html_ed2c1d3ac17d4966a2c6b4ad2ff687e0); - - - marker_a0193887dd2543a59c9c4e48ba787723.bindPopup(popup_548121ced5c9493787a5a8050a474b5d) - ; - - - - - var marker_ca3b9c2558264ada842a83803605b7a4 = L.marker( - [46.438664912, 8.072999708], - {} - ).addTo(map_4d5df68455c74bc8b919c511fe0315a2); - - - var icon_5cde2c679c2f413ca3f25a29a8843739 = L.AwesomeMarkers.icon( - {"extraClasses": "fa-rotate-0", "icon": "info-sign", "iconColor": "white", "markerColor": "red", "prefix": "glyphicon"} - ); - marker_ca3b9c2558264ada842a83803605b7a4.setIcon(icon_5cde2c679c2f413ca3f25a29a8843739); - - - var popup_41a15bb1538c408ababf492935335fb3 = L.popup({"maxWidth": "100%"}); - - - var html_d2734e001d8b4cd38243c4e57eb0f9f3 = $(`<div id="html_d2734e001d8b4cd38243c4e57eb0f9f3" style="width: 100.0%; height: 100.0%;">Aletschglacier</div>`)[0]; - popup_41a15bb1538c408ababf492935335fb3.setContent(html_d2734e001d8b4cd38243c4e57eb0f9f3); - - - marker_ca3b9c2558264ada842a83803605b7a4.bindPopup(popup_41a15bb1538c408ababf492935335fb3) - ; - - - - - var marker_a076a27977f94495b85ef3613cc4f96c = L.marker( - [46.11654, 7.445683], - {} - ).addTo(map_4d5df68455c74bc8b919c511fe0315a2); - - - var icon_7cfce7c37b6c49a3994d49fff94e63fc = L.AwesomeMarkers.icon( - {"extraClasses": "fa-rotate-0", "icon": "info-sign", "iconColor": "white", "markerColor": "red", "prefix": "glyphicon"} - ); - marker_a076a27977f94495b85ef3613cc4f96c.setIcon(icon_7cfce7c37b6c49a3994d49fff94e63fc); - - - var popup_82f02b6390674046877289fbfb0e5699 = L.popup({"maxWidth": "100%"}); - - - var html_d2821821a41d4bfa984a50927b423cdc = $(`<div id="html_d2821821a41d4bfa984a50927b423cdc" style="width: 100.0%; height: 100.0%;">Zermatt</div>`)[0]; - popup_82f02b6390674046877289fbfb0e5699.setContent(html_d2821821a41d4bfa984a50927b423cdc); - - - marker_a076a27977f94495b85ef3613cc4f96c.bindPopup(popup_82f02b6390674046877289fbfb0e5699) + marker_01baaf082c3840d3827fb8f5c0f78e0c.bindPopup(popup_a09fa7e090d14e21bfa1c1c0def90c9b) ; diff --git a/templates/user_detail.html b/templates/user_detail.html index 438076d..e2e1db9 100644 --- a/templates/user_detail.html +++ b/templates/user_detail.html @@ -9,7 +9,7 @@ <ul class="list-group list-group-flush"> <li class="list-group-item"><b>id</b>: {{user.id }}</li> <li class="list-group-item"><b>total trips:</b> {{ user.number_of_trips }}</li> - <li class="list-group-item"><b>g of CO2 saved (total):</b> {{ user.total_co2_savings }}</li> + <li class="list-group-item"><b>Kg of CO2 saved (total):</b> {{ user.total_co2_savings }}</li> </ul> </div> </div>