diff --git a/src/flask_covid19/blueprints/data_owid/owid_views.py b/src/flask_covid19/blueprints/data_owid/owid_views.py index 3a10e796d3837ce66209631366a8d2f88fd25501..8e93d611118fdd4fc6181dd84704f7bfdbb8ca25 100644 --- a/src/flask_covid19/blueprints/data_owid/owid_views.py +++ b/src/flask_covid19/blueprints/data_owid/owid_views.py @@ -99,7 +99,7 @@ def url_owid_date_reported_one(date_reported_id: int, page: int = 1): "data of all reported countries for OWID date reported " + str(date_reported) + " " ) try: - page_data = OwidData.get_data_for_day(date_reported, page) + page_data = OwidData.get_by_date_reported(date_reported, page) except OperationalError: flash("No data in the database.") page_data = None @@ -120,7 +120,7 @@ def url_owid_date_reported_one_cases_new(date_reported_id: int, page: int = 1): "data of all reported countries for OWID date reported " + str(date_reported) + " " ) try: - page_data = OwidData.get_data_for_day_order_by_cases_new(date_reported, page) + page_data = OwidData.find_by_date_reported_order_by_cases_new(date_reported, page) except OperationalError: flash("No data in the database.") page_data = None @@ -141,7 +141,7 @@ def url_owid_date_reported_one_cases_cumulative(date_reported_id: int, page: int "data of all reported countries for OWID date reported " + str(date_reported) + " " ) try: - page_data = OwidData.get_data_for_day_order_by_cases_cumulative(date_reported, page) + page_data = OwidData.find_by_date_reported_order_by_cases_cumulative(date_reported, page) except OperationalError: flash("No data in the database.") page_data = None @@ -162,7 +162,7 @@ def url_owid_date_reported_one_deaths_new(date_reported_id: int, page: int = 1): "data of all reported countries for OWID date reported " + str(date_reported) + " " ) try: - page_data = OwidData.get_data_for_day_order_by_deaths_new(date_reported, page) + page_data = OwidData.find_by_date_reported_order_by_deaths_new(date_reported, page) except OperationalError: flash("No data in the database.") page_data = None @@ -183,7 +183,7 @@ def url_owid_date_reported_one_deaths_cumulative(date_reported_id: int, page: in "data of all reported countries for OWID date reported " + str(date_reported) + " " ) try: - page_data = OwidData.get_data_for_day_order_by_deaths_cumulative(date_reported, page) + page_data = OwidData.find_by_date_reported_order_by_deaths_cumulative(date_reported, page) except OperationalError: flash("No data in the database.") page_data = None diff --git a/src/flask_covid19/blueprints/data_owid/templates/owid/continent/all/owid_continent_all_table.html b/src/flask_covid19/blueprints/data_owid/templates/owid/continent/all/owid_continent_all_table.html index 3b3aaeef40fb37ed785fec1e824aedafafceeb80..79b3cafeb193ff7da7074849b54b6ae1c999f64d 100644 --- a/src/flask_covid19/blueprints/data_owid/templates/owid/continent/all/owid_continent_all_table.html +++ b/src/flask_covid19/blueprints/data_owid/templates/owid/continent/all/owid_continent_all_table.html @@ -1,6 +1,6 @@ <div class="table-responsive"> <table class="table table-hover table-striped table-dark"> - <thead> + <thead class="table-secondary"> <tr> <th scope="col">continent</th> </tr> @@ -16,7 +16,7 @@ </tr> {% endfor %} </tbody> - <tfoot> + <tfoot class="table-secondary"> <tr> <th scope="col">continent</th> </tr> diff --git a/src/flask_covid19/blueprints/data_who/templates/who/country/one/who_country_one_table.html b/src/flask_covid19/blueprints/data_who/templates/who/country/one/who_country_one_table.html index 8f5607536468fb9a8a496ac4570c09a9077b060b..33ac0705e07d51c1938263b6fcdd3d201d72f983 100644 --- a/src/flask_covid19/blueprints/data_who/templates/who/country/one/who_country_one_table.html +++ b/src/flask_covid19/blueprints/data_who/templates/who/country/one/who_country_one_table.html @@ -1,48 +1,7 @@ <div class="table-responsive"> <table class="table table-hover table-striped table-dark"> <thead class="table-secondary"> - <tr> - <th scope="col"> - <a href="{{ url_for('who.url_who_date_reported_all') }}"> - date reported - </a> - </th> - <th scope="col"> - <a href="{{ url_for('who.url_who_country_deaths_new',country_id=who_country.id) }}"> - deaths new - </a> - </th> - <th scope="col"> - <a href="{{ url_for('who.url_who_country_cases_new',country_id=who_country.id) }}"> - cases new - </a> - </th> - <th scope="col"> - <a href="{{ url_for('who.url_who_country_deaths_cumulative',country_id=who_country.id) }}"> - deaths cumulative - </a> - </th> - <th scope="col"> - <a href="{{ url_for('who.url_who_country_cases_cumulative',country_id=who_country.id) }}"> - cases cumulative - </a> - </th> - <th scope="col"> - <a href="{{ url_for('who.url_who_country_all') }}"> - country code - </a> - </th> - <th scope="col"> - <a href="{{ url_for('who.url_who_country_all') }}"> - country - </a> - </th> - <th scope="col"> - <a href="{{ url_for('who.url_who_region_all') }}"> - region - </a> - </th> - </tr> + {% include 'who/country/one/who_country_one_table_head.html' %} </thead> <tbody> {% for who_global_data in page_data.items %} @@ -83,7 +42,7 @@ {% endfor %} </tbody> <tfoot> - + {% include 'who/country/one/who_country_one_table_head.html' %} </tfoot> </table> </div> \ No newline at end of file diff --git a/src/flask_covid19/blueprints/data_who/templates/who/country/one/who_country_one_table_head.html b/src/flask_covid19/blueprints/data_who/templates/who/country/one/who_country_one_table_head.html index 1608036a7498a6d30c6e1139d5ead80a9797a146..a370849dc3c02b264203446ba0c12f40ac0909ef 100644 --- a/src/flask_covid19/blueprints/data_who/templates/who/country/one/who_country_one_table_head.html +++ b/src/flask_covid19/blueprints/data_who/templates/who/country/one/who_country_one_table_head.html @@ -1,4 +1,4 @@ - <tr> +<tr> <th scope="col"> <a href="{{ url_for('who.url_who_date_reported_all') }}"> date reported diff --git a/src/flask_covid19/blueprints/data_who/templates/who/data/who_table_global_data.html b/src/flask_covid19/blueprints/data_who/templates/who/data/who_table_global_data.html index 2a1df62095edd064af7c896bcec420419010167c..a18e192a377a8029ad4c1dc67ff4b6f463c80cbe 100644 --- a/src/flask_covid19/blueprints/data_who/templates/who/data/who_table_global_data.html +++ b/src/flask_covid19/blueprints/data_who/templates/who/data/who_table_global_data.html @@ -33,7 +33,7 @@ </tr> {% endfor %} </tbody> - <tfoot> + <tfoot class="table-secondary"> {% include 'who/data/who_table_global_data_head.html' %} </tfoot> </table> diff --git a/src/flask_covid19/blueprints/data_who/templates/who/date_reported/one/who_date_reported_one_table.html b/src/flask_covid19/blueprints/data_who/templates/who/date_reported/one/who_date_reported_one_table.html index c44fb605ae84464317fccd3cec54cd7584da782d..491bf8d835f11d668d4e15e252607ae3012a2b8b 100644 --- a/src/flask_covid19/blueprints/data_who/templates/who/date_reported/one/who_date_reported_one_table.html +++ b/src/flask_covid19/blueprints/data_who/templates/who/date_reported/one/who_date_reported_one_table.html @@ -41,7 +41,7 @@ </tr> {% endfor %} </tbody> - <tfoot> + <tfoot class="table-secondary"> {% include 'who/date_reported/one/who_date_reported_one_table_head.html' %} </tfoot> </table> diff --git a/src/flask_covid19/blueprints/data_who/templates/who/flat/who_flat_table.html b/src/flask_covid19/blueprints/data_who/templates/who/flat/who_flat_table.html index c28f75d8a190b11f1cc30f414ebbab8a668cbb2a..e79b2c5dc61f25aa2657cb6c5c4f6fc6368cc286 100644 --- a/src/flask_covid19/blueprints/data_who/templates/who/flat/who_flat_table.html +++ b/src/flask_covid19/blueprints/data_who/templates/who/flat/who_flat_table.html @@ -1,6 +1,6 @@ <div class="table-responsive"> <table class="table table-hover table-striped table-dark"> - <thead> + <thead class="table-secondary"> {% include 'who/flat/who_flat_table_head.html' %} </thead> <tbody> @@ -33,7 +33,7 @@ </tr> {% endfor %} </tbody> - <tfoot> + <tfoot class="table-secondary"> {% include 'who/flat/who_flat_table_head.html' %} </tfoot> </table> diff --git a/src/flask_covid19/blueprints/data_who/templates/who/imported/who_imported_table.html b/src/flask_covid19/blueprints/data_who/templates/who/imported/who_imported_table.html index 6e1b392d35175d3351b9f4f88433f0033bcba84e..a5371d7d589fa179e1e7591681622764ffd2f61a 100644 --- a/src/flask_covid19/blueprints/data_who/templates/who/imported/who_imported_table.html +++ b/src/flask_covid19/blueprints/data_who/templates/who/imported/who_imported_table.html @@ -1,6 +1,6 @@ <div class="table-responsive"> <table class="table table-hover table-striped table-dark"> - <thead> + <thead class="table-secondary"> {% include 'who/imported/who_imported_table_head.html' %} </thead> <tbody> @@ -17,7 +17,7 @@ </tr> {% endfor %} </tbody> - <tfoot> + <tfoot class="table-secondary"> {% include 'who/imported/who_imported_table_head.html' %} </tfoot> </table> diff --git a/src/flask_covid19/blueprints/data_who/templates/who/region/all/who_region_all_table.html b/src/flask_covid19/blueprints/data_who/templates/who/region/all/who_region_all_table.html index 4548c266062404fb63fce3ce8330b046b48d36b8..bbedbc468fa0ffebd285d1b1334be977f913490b 100644 --- a/src/flask_covid19/blueprints/data_who/templates/who/region/all/who_region_all_table.html +++ b/src/flask_covid19/blueprints/data_who/templates/who/region/all/who_region_all_table.html @@ -1,6 +1,6 @@ <div class="table-responsive"> <table class="table table-hover table-striped table-dark"> - <thead> + <thead class="table-secondary"> <tr> <th scope="col">who_region</th> </tr> @@ -16,7 +16,7 @@ </tr> {% endfor %} </tbody> - <tfoot> + <tfoot class="table-secondary"> <tr> <th scope="col">who_region</th> </tr>