From 7ae439cda8ff12eeeb7913f34cc86757b430c3d4 Mon Sep 17 00:00:00 2001
From: thomaswoehlke <thomas.woehlke@gmail.com>
Date: Sun, 4 Apr 2021 21:46:02 +0200
Subject: [PATCH] update data

---
 .../owid/continent/owid_continents.html       |   5 +
 .../owid/country/owid_countries.html          |   5 +
 .../owid/country/owid_countries_table.html    | 120 +++++++++---------
 .../date_reported/owid_date_reported_one.html |  43 +------
 .../owid_date_reported_pagination.html        |  37 ++++++
 ..._owid_table_global_data_date_reported.html | 120 +++++++++---------
 .../owid/templates/owid/owid_imported.html    |   5 +
 7 files changed, 178 insertions(+), 157 deletions(-)
 create mode 100644 src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_pagination.html

diff --git a/src/covid19/blueprints/owid/templates/owid/continent/owid_continents.html b/src/covid19/blueprints/owid/templates/owid/continent/owid_continents.html
index aa9f3b96..7a4964af 100644
--- a/src/covid19/blueprints/owid/templates/owid/continent/owid_continents.html
+++ b/src/covid19/blueprints/owid/templates/owid/continent/owid_continents.html
@@ -15,6 +15,11 @@
                 {% include 'owid/fragments/fragment_owid_test_table.html' %}
             </div>
         </div>
+        <div class="row">
+            <div class="col">
+                {% include 'owid/fragments/fragment_owid_test_pagination.html' %}
+            </div>
+        </div>
     </div>
 {% endblock %}
 
diff --git a/src/covid19/blueprints/owid/templates/owid/country/owid_countries.html b/src/covid19/blueprints/owid/templates/owid/country/owid_countries.html
index aa9f3b96..7a4964af 100644
--- a/src/covid19/blueprints/owid/templates/owid/country/owid_countries.html
+++ b/src/covid19/blueprints/owid/templates/owid/country/owid_countries.html
@@ -15,6 +15,11 @@
                 {% include 'owid/fragments/fragment_owid_test_table.html' %}
             </div>
         </div>
+        <div class="row">
+            <div class="col">
+                {% include 'owid/fragments/fragment_owid_test_pagination.html' %}
+            </div>
+        </div>
     </div>
 {% endblock %}
 
diff --git a/src/covid19/blueprints/owid/templates/owid/country/owid_countries_table.html b/src/covid19/blueprints/owid/templates/owid/country/owid_countries_table.html
index 0b5db3ad..50b155e2 100644
--- a/src/covid19/blueprints/owid/templates/owid/country/owid_countries_table.html
+++ b/src/covid19/blueprints/owid/templates/owid/country/owid_countries_table.html
@@ -63,67 +63,67 @@
                         </tr>
                     </thead>
                     <tbody>
-                    {% for owid_import in page_data.items %}
+                    {% for owid in page_data.items %}
                         <tr>
-                            <td>{{ owid_import.iso_code }}</td>
-                            <td>{{ owid_import.continent }}</td>
-                            <td>{{ owid_import.location }}</td>
-                            <td>{{ owid_import.date }}</td>
-                            <td>{{ owid_import.total_cases }}</td>
-                            <td>{{ owid_import.new_cases }}</td>
-                            <td>{{ owid_import.new_cases_smoothed }}</td>
-                            <td>{{ owid_import.total_deaths }}</td>
-                            <td>{{ owid_import.new_deaths }}</td>
-                            <td>{{ owid_import.new_deaths_smoothed }}</td>
-                            <td>{{ owid_import.total_cases_per_million }}</td>
-                            <td>{{ owid_import.new_cases_per_million }}</td>
-                            <td>{{ owid_import.new_cases_smoothed_per_million }}</td>
-                            <td>{{ owid_import.total_deaths_per_million }}</td>
-                            <td>{{ owid_import.new_deaths_per_million }}</td>
-                            <td>{{ owid_import.new_deaths_smoothed_per_million }}</td>
-                            <td>{{ owid_import.reproduction_rate }}</td>
-                            <td>{{ owid_import.icu_patients }}</td>
-                            <td>{{ owid_import.icu_patients_per_million }}</td>
-                            <td>{{ owid_import.hosp_patients }}</td>
-                            <td>{{ owid_import.hosp_patients_per_million }}</td>
-                            <td>{{ owid_import.weekly_icu_admissions }}</td>
-                            <td>{{ owid_import.weekly_icu_admissions_per_million }}</td>
-                            <td>{{ owid_import.weekly_hosp_admissions }}</td>
-                            <td>{{ owid_import.weekly_hosp_admissions_per_million }}</td>
-                            <td>{{ owid_import.new_tests }}</td>
-                            <td>{{ owid_import.total_tests }}</td>
-                            <td>{{ owid_import.total_tests_per_thousand }}</td>
-                            <td>{{ owid_import.new_tests_per_thousand }}</td>
-                            <td>{{ owid_import.new_tests_smoothed }}</td>
-                            <td>{{ owid_import.new_tests_smoothed_per_thousand }}</td>
-                            <td>{{ owid_import.positive_rate }}</td>
-                            <td>{{ owid_import.tests_per_case }}</td>
-                            <td>{{ owid_import.tests_units }}</td>
-                            <td>{{ owid_import.total_vaccinations }}</td>
-                            <td>{{ owid_import.people_vaccinated }}</td>
-                            <td>{{ owid_import.people_fully_vaccinated }}</td>
-                            <td>{{ owid_import.new_vaccinations }}</td>
-                            <td>{{ owid_import.new_vaccinations_smoothed }}</td>
-                            <td>{{ owid_import.total_vaccinations_per_hundred }}</td>
-                            <td>{{ owid_import.people_vaccinated_per_hundred }}</td>
-                            <td>{{ owid_import.people_fully_vaccinated_per_hundred }}</td>
-                            <td>{{ owid_import.new_vaccinations_smoothed_per_million }}</td>
-                            <td>{{ owid_import.stringency_index }}</td>
-                            <td>{{ owid_import.population }}</td>
-                            <td>{{ owid_import.population_density }}</td>
-                            <td>{{ owid_import.median_age }}</td>
-                            <td>{{ owid_import.aged_65_older }}</td>
-                            <td>{{ owid_import.aged_70_older }}</td>
-                            <td>{{ owid_import.gdp_per_capita }}</td>
-                            <td>{{ owid_import.extreme_poverty }}</td>
-                            <td>{{ owid_import.cardiovasc_death_rate }}</td>
-                            <td>{{ owid_import.diabetes_prevalence }}</td>
-                            <td>{{ owid_import.female_smokers }}</td>
-                            <td>{{ owid_import.male_smokers }}</td>
-                            <td>{{ owid_import.handwashing_facilities }}</td>
-                            <td>{{ owid_import.hospital_beds_per_thousand }}</td>
-                            <td>{{ owid_import.life_expectancy }}</td>
-                            <td>{{ owid_import.human_development_index }}</td>
+                            <td>{{ owid.country.iso_code }}</td>
+                            <td>{{ owid.country.continent.region }}</td>
+                            <td>{{ owid.country.location }}</td>
+                            <td>{{ owid.date }}</td>
+                            <td>{{ owid.total_cases }}</td>
+                            <td>{{ owid.new_cases }}</td>
+                            <td>{{ owid.new_cases_smoothed }}</td>
+                            <td>{{ owid.total_deaths }}</td>
+                            <td>{{ owid.new_deaths }}</td>
+                            <td>{{ owid.new_deaths_smoothed }}</td>
+                            <td>{{ owid.total_cases_per_million }}</td>
+                            <td>{{ owid.new_cases_per_million }}</td>
+                            <td>{{ owid.new_cases_smoothed_per_million }}</td>
+                            <td>{{ owid.total_deaths_per_million }}</td>
+                            <td>{{ owid.new_deaths_per_million }}</td>
+                            <td>{{ owid.new_deaths_smoothed_per_million }}</td>
+                            <td>{{ owid.reproduction_rate }}</td>
+                            <td>{{ owid.icu_patients }}</td>
+                            <td>{{ owid.icu_patients_per_million }}</td>
+                            <td>{{ owid.hosp_patients }}</td>
+                            <td>{{ owid.hosp_patients_per_million }}</td>
+                            <td>{{ owid.weekly_icu_admissions }}</td>
+                            <td>{{ owid.weekly_icu_admissions_per_million }}</td>
+                            <td>{{ owid.weekly_hosp_admissions }}</td>
+                            <td>{{ owid.weekly_hosp_admissions_per_million }}</td>
+                            <td>{{ owid.new_tests }}</td>
+                            <td>{{ owid.total_tests }}</td>
+                            <td>{{ owid.total_tests_per_thousand }}</td>
+                            <td>{{ owid.new_tests_per_thousand }}</td>
+                            <td>{{ owid.new_tests_smoothed }}</td>
+                            <td>{{ owid.new_tests_smoothed_per_thousand }}</td>
+                            <td>{{ owid.positive_rate }}</td>
+                            <td>{{ owid.tests_per_case }}</td>
+                            <td>{{ owid.tests_units }}</td>
+                            <td>{{ owid.total_vaccinations }}</td>
+                            <td>{{ owid.people_vaccinated }}</td>
+                            <td>{{ owid.people_fully_vaccinated }}</td>
+                            <td>{{ owid.new_vaccinations }}</td>
+                            <td>{{ owid.new_vaccinations_smoothed }}</td>
+                            <td>{{ owid.total_vaccinations_per_hundred }}</td>
+                            <td>{{ owid.people_vaccinated_per_hundred }}</td>
+                            <td>{{ owid.people_fully_vaccinated_per_hundred }}</td>
+                            <td>{{ owid.new_vaccinations_smoothed_per_million }}</td>
+                            <td>{{ owid.stringency_index }}</td>
+                            <td>{{ owid.population }}</td>
+                            <td>{{ owid.population_density }}</td>
+                            <td>{{ owid.median_age }}</td>
+                            <td>{{ owid.aged_65_older }}</td>
+                            <td>{{ owid.aged_70_older }}</td>
+                            <td>{{ owid.gdp_per_capita }}</td>
+                            <td>{{ owid.extreme_poverty }}</td>
+                            <td>{{ owid.cardiovasc_death_rate }}</td>
+                            <td>{{ owid.diabetes_prevalence }}</td>
+                            <td>{{ owid.female_smokers }}</td>
+                            <td>{{ owid.male_smokers }}</td>
+                            <td>{{ owid.handwashing_facilities }}</td>
+                            <td>{{ owid.hospital_beds_per_thousand }}</td>
+                            <td>{{ owid.life_expectancy }}</td>
+                            <td>{{ owid.human_development_index }}</td>
                         </tr>
                     {% endfor %}
                     </tbody>
diff --git a/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_one.html b/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_one.html
index ff168761..59100f37 100644
--- a/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_one.html
+++ b/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_one.html
@@ -7,43 +7,7 @@
     <div class="container">
         <div class="row">
             <div class="col">
-                {% if page_data.pages > 1 %}
-                <!-- previous page -->
-                    <ul class="pagination">
-                    {% if page_data.has_prev %}
-                    <li class="page-item">
-                        <a class="page-link" href="{{ url_for('owid.url_owid_date_reported',
-                        date_reported_id=owid_date_reported.id, page=page_data.prev_num) }}">Previous</a>
-                    </li>
-                    {% endif %}
-                    <!-- all page numbers -->
-                    {% for page_num in page_data.iter_pages() %}
-                        {% if page_num %}
-                            {% if page_num != page_data.page %}
-                                <li class="page-item">
-                                    <a class="page-link" href="{{ url_for('owid.url_owid_date_reported',
-                                    date_reported_id=owid_date_reported.id, page=page_num) }}">{{ page_num }}</a>
-                                </li>
-                            {% else %}
-                                <li class="page-item active">
-                                    <a class="page-link" href="#">{{ page_num }}</a>
-                                </li>
-                            {% endif %}
-                       {% else %}
-                           <li class="page-item">
-                               <span class="ellipsis page-link my-page-item-ellipsis-page-link">…</span>
-                           </li>
-                       {% endif %}
-                    {% endfor %}
-                    <!-- next page -->
-                    {% if page_data.has_next %}
-                    <li class="page-item">
-                        <a class="page-link" href="{{ url_for('owid.url_owid_date_reported',
-                        date_reported_id=owid_date_reported.id, page=page_data.next_num) }}">Next</a>
-                    </li>
-                    {% endif %}
-                    </ul>
-                {% endif %}
+                {% include 'owid/date_reported/owid_date_reported_pagination.html' %}
             </div>
         </div>
         <div class="row">
@@ -51,6 +15,11 @@
                 {% include 'owid/fragments/fragment_owid_table_global_data_date_reported.html' %}
             </div>
         </div>
+        <div class="row">
+            <div class="col">
+                {% include 'owid/date_reported/owid_date_reported_pagination.html' %}
+            </div>
+        </div>
     </div>
 
 {% endblock %}
diff --git a/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_pagination.html b/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_pagination.html
new file mode 100644
index 00000000..238c9a32
--- /dev/null
+++ b/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_pagination.html
@@ -0,0 +1,37 @@
+{% if page_data.pages > 1 %}
+                <!-- previous page -->
+                    <ul class="pagination">
+                    {% if page_data.has_prev %}
+                    <li class="page-item">
+                        <a class="page-link" href="{{ url_for('owid.url_owid_date_reported',
+                        date_reported_id=owid_date_reported.id, page=page_data.prev_num) }}">Previous</a>
+                    </li>
+                    {% endif %}
+                    <!-- all page numbers -->
+                    {% for page_num in page_data.iter_pages() %}
+                        {% if page_num %}
+                            {% if page_num != page_data.page %}
+                                <li class="page-item">
+                                    <a class="page-link" href="{{ url_for('owid.url_owid_date_reported',
+                                    date_reported_id=owid_date_reported.id, page=page_num) }}">{{ page_num }}</a>
+                                </li>
+                            {% else %}
+                                <li class="page-item active">
+                                    <a class="page-link" href="#">{{ page_num }}</a>
+                                </li>
+                            {% endif %}
+                       {% else %}
+                           <li class="page-item">
+                               <span class="ellipsis page-link my-page-item-ellipsis-page-link">…</span>
+                           </li>
+                       {% endif %}
+                    {% endfor %}
+                    <!-- next page -->
+                    {% if page_data.has_next %}
+                    <li class="page-item">
+                        <a class="page-link" href="{{ url_for('owid.url_owid_date_reported',
+                        date_reported_id=owid_date_reported.id, page=page_data.next_num) }}">Next</a>
+                    </li>
+                    {% endif %}
+                    </ul>
+                {% endif %}
\ No newline at end of file
diff --git a/src/covid19/blueprints/owid/templates/owid/fragments/fragment_owid_table_global_data_date_reported.html b/src/covid19/blueprints/owid/templates/owid/fragments/fragment_owid_table_global_data_date_reported.html
index a3141c64..764caf1c 100644
--- a/src/covid19/blueprints/owid/templates/owid/fragments/fragment_owid_table_global_data_date_reported.html
+++ b/src/covid19/blueprints/owid/templates/owid/fragments/fragment_owid_table_global_data_date_reported.html
@@ -63,67 +63,67 @@
             </tr>
         </thead>
         <tbody>
-        {% for owid_data in page_data.items %}
+        {% for owid in page_data.items %}
             <tr>
-                <td>{{ owid_data.iso_code }}</td>
-                <td>{{ owid_data.continent }}</td>
-                <td>{{ owid_data.location }}</td>
-                <td>{{ owid_data.date_reported.date_reported }}</td>
-                <td>{{ owid_data.total_cases }}</td>
-                <td>{{ owid_data.new_cases }}</td>
-                <td>{{ owid_data.new_cases_smoothed }}</td>
-                <td>{{ owid_data.total_deaths }}</td>
-                <td>{{ owid_data.new_deaths }}</td>
-                <td>{{ owid_data.new_deaths_smoothed }}</td>
-                <td>{{ owid_data.total_cases_per_million }}</td>
-                <td>{{ owid_data.new_cases_per_million }}</td>
-                <td>{{ owid_data.new_cases_smoothed_per_million }}</td>
-                <td>{{ owid_data.total_deaths_per_million }}</td>
-                <td>{{ owid_data.new_deaths_per_million }}</td>
-                <td>{{ owid_data.new_deaths_smoothed_per_million }}</td>
-                <td>{{ owid_data.reproduction_rate }}</td>
-                <td>{{ owid_data.icu_patients }}</td>
-                <td>{{ owid_data.icu_patients_per_million }}</td>
-                <td>{{ owid_data.hosp_patients }}</td>
-                <td>{{ owid_data.hosp_patients_per_million }}</td>
-                <td>{{ owid_data.weekly_icu_admissions }}</td>
-                <td>{{ owid_data.weekly_icu_admissions_per_million }}</td>
-                <td>{{ owid_data.weekly_hosp_admissions }}</td>
-                <td>{{ owid_data.weekly_hosp_admissions_per_million }}</td>
-                <td>{{ owid_data.new_tests }}</td>
-                <td>{{ owid_data.total_tests }}</td>
-                <td>{{ owid_data.total_tests_per_thousand }}</td>
-                <td>{{ owid_data.new_tests_per_thousand }}</td>
-                <td>{{ owid_data.new_tests_smoothed }}</td>
-                <td>{{ owid_data.new_tests_smoothed_per_thousand }}</td>
-                <td>{{ owid_data.positive_rate }}</td>
-                <td>{{ owid_data.tests_per_case }}</td>
-                <td>{{ owid_data.tests_units }}</td>
-                <td>{{ owid_data.total_vaccinations }}</td>
-                <td>{{ owid_data.people_vaccinated }}</td>
-                <td>{{ owid_data.people_fully_vaccinated }}</td>
-                <td>{{ owid_data.new_vaccinations }}</td>
-                <td>{{ owid_data.new_vaccinations_smoothed }}</td>
-                <td>{{ owid_data.total_vaccinations_per_hundred }}</td>
-                <td>{{ owid_data.people_vaccinated_per_hundred }}</td>
-                <td>{{ owid_data.people_fully_vaccinated_per_hundred }}</td>
-                <td>{{ owid_data.new_vaccinations_smoothed_per_million }}</td>
-                <td>{{ owid_data.stringency_index }}</td>
-                <td>{{ owid_data.population }}</td>
-                <td>{{ owid_data.population_density }}</td>
-                <td>{{ owid_data.median_age }}</td>
-                <td>{{ owid_data.aged_65_older }}</td>
-                <td>{{ owid_data.aged_70_older }}</td>
-                <td>{{ owid_data.gdp_per_capita }}</td>
-                <td>{{ owid_data.extreme_poverty }}</td>
-                <td>{{ owid_data.cardiovasc_death_rate }}</td>
-                <td>{{ owid_data.diabetes_prevalence }}</td>
-                <td>{{ owid_data.female_smokers }}</td>
-                <td>{{ owid_data.male_smokers }}</td>
-                <td>{{ owid_data.handwashing_facilities }}</td>
-                <td>{{ owid_data.hospital_beds_per_thousand }}</td>
-                <td>{{ owid_data.life_expectancy }}</td>
-                <td>{{ owid_data.human_development_index }}</td>
+                <td>{{ owid.country.iso_code }}</td>
+                <td>{{ owid.country.continent.region }}</td>
+                <td>{{ owid.country.location }}</td>
+                <td>{{ owid.date_reported }}</td>
+                <td>{{ owid.total_cases }}</td>
+                <td>{{ owid.new_cases }}</td>
+                <td>{{ owid.new_cases_smoothed }}</td>
+                <td>{{ owid.total_deaths }}</td>
+                <td>{{ owid.new_deaths }}</td>
+                <td>{{ owid.new_deaths_smoothed }}</td>
+                <td>{{ owid.total_cases_per_million }}</td>
+                <td>{{ owid.new_cases_per_million }}</td>
+                <td>{{ owid.new_cases_smoothed_per_million }}</td>
+                <td>{{ owid.total_deaths_per_million }}</td>
+                <td>{{ owid.new_deaths_per_million }}</td>
+                <td>{{ owid.new_deaths_smoothed_per_million }}</td>
+                <td>{{ owid.reproduction_rate }}</td>
+                <td>{{ owid.icu_patients }}</td>
+                <td>{{ owid.icu_patients_per_million }}</td>
+                <td>{{ owid.hosp_patients }}</td>
+                <td>{{ owid.hosp_patients_per_million }}</td>
+                <td>{{ owid.weekly_icu_admissions }}</td>
+                <td>{{ owid.weekly_icu_admissions_per_million }}</td>
+                <td>{{ owid.weekly_hosp_admissions }}</td>
+                <td>{{ owid.weekly_hosp_admissions_per_million }}</td>
+                <td>{{ owid.new_tests }}</td>
+                <td>{{ owid.total_tests }}</td>
+                <td>{{ owid.total_tests_per_thousand }}</td>
+                <td>{{ owid.new_tests_per_thousand }}</td>
+                <td>{{ owid.new_tests_smoothed }}</td>
+                <td>{{ owid.new_tests_smoothed_per_thousand }}</td>
+                <td>{{ owid.positive_rate }}</td>
+                <td>{{ owid.tests_per_case }}</td>
+                <td>{{ owid.tests_units }}</td>
+                <td>{{ owid.total_vaccinations }}</td>
+                <td>{{ owid.people_vaccinated }}</td>
+                <td>{{ owid.people_fully_vaccinated }}</td>
+                <td>{{ owid.new_vaccinations }}</td>
+                <td>{{ owid.new_vaccinations_smoothed }}</td>
+                <td>{{ owid.total_vaccinations_per_hundred }}</td>
+                <td>{{ owid.people_vaccinated_per_hundred }}</td>
+                <td>{{ owid.people_fully_vaccinated_per_hundred }}</td>
+                <td>{{ owid.new_vaccinations_smoothed_per_million }}</td>
+                <td>{{ owid.stringency_index }}</td>
+                <td>{{ owid.country.population }}</td>
+                <td>{{ owid.country.population_density }}</td>
+                <td>{{ owid.country.median_age }}</td>
+                <td>{{ owid.country.aged_65_older }}</td>
+                <td>{{ owid.country.aged_70_older }}</td>
+                <td>{{ owid.country.gdp_per_capita }}</td>
+                <td>{{ owid.country.extreme_poverty }}</td>
+                <td>{{ owid.country.cardiovasc_death_rate }}</td>
+                <td>{{ owid.country.diabetes_prevalence }}</td>
+                <td>{{ owid.country.female_smokers }}</td>
+                <td>{{ owid.country.male_smokers }}</td>
+                <td>{{ owid.country.handwashing_facilities }}</td>
+                <td>{{ owid.country.hospital_beds_per_thousand }}</td>
+                <td>{{ owid.country.life_expectancy }}</td>
+                <td>{{ owid.country.human_development_index }}</td>
             </tr>
         {% endfor %}
         </tbody>
diff --git a/src/covid19/blueprints/owid/templates/owid/owid_imported.html b/src/covid19/blueprints/owid/templates/owid/owid_imported.html
index 2eca96c8..8fd968a4 100644
--- a/src/covid19/blueprints/owid/templates/owid/owid_imported.html
+++ b/src/covid19/blueprints/owid/templates/owid/owid_imported.html
@@ -15,6 +15,11 @@
                 {% include 'owid/fragments/fragment_owid_imported_table.html' %}
             </div>
         </div>
+        <div class="row">
+            <div class="col">
+                {% include 'owid/fragments/fragment_owid_imported_pagination.html' %}
+            </div>
+        </div>
     </div>
 {% endblock %}
 
-- 
GitLab