From 42a24ab56d14ac7d4bbf922a10d350470c61e05b Mon Sep 17 00:00:00 2001 From: thomaswoehlke <thomas.woehlke@gmail.com> Date: Sat, 8 May 2021 23:20:51 +0200 Subject: [PATCH] working on: 0.0.34 Release --- .../blueprints/ecdc/ecdc_model_import.py | 12 +++--- .../ecdc/imported/ecdc_imported_table.html | 8 +++- .../rki_cases/templates/rki/rki_imported.html | 42 ++++++++++++------- 3 files changed, 38 insertions(+), 24 deletions(-) diff --git a/src/covid19/blueprints/ecdc/ecdc_model_import.py b/src/covid19/blueprints/ecdc/ecdc_model_import.py index 4eafae3c..fba66476 100644 --- a/src/covid19/blueprints/ecdc/ecdc_model_import.py +++ b/src/covid19/blueprints/ecdc/ecdc_model_import.py @@ -38,18 +38,18 @@ class EcdcImport(db.Model): @classmethod def get_all_as_page(cls, page: int): return db.session.query(cls).order_by( - cls.year, - cls.month, - cls.day, + cls.date_rep_year, + cls.date_rep_month, + cls.date_rep_day, cls.countries_and_territories ).paginate(page, per_page=ITEMS_PER_PAGE) @classmethod def get_all(cls): return db.session.query(cls).order_by( - cls.year, - cls.month, - cls.day, + cls.date_rep_year, + cls.date_rep_month, + cls.date_rep_day, cls.countries_and_territories ).all() diff --git a/src/covid19/blueprints/ecdc/templates/ecdc/imported/ecdc_imported_table.html b/src/covid19/blueprints/ecdc/templates/ecdc/imported/ecdc_imported_table.html index fe122cb0..b6a794f3 100644 --- a/src/covid19/blueprints/ecdc/templates/ecdc/imported/ecdc_imported_table.html +++ b/src/covid19/blueprints/ecdc/templates/ecdc/imported/ecdc_imported_table.html @@ -2,7 +2,9 @@ <thead class="table-secondary"> <tr> <th scope="col">date reported</th> - <th scope="col">year_week</th> + <th scope="col">date rep year</th> + <th scope="col">date rep month</th> + <th scope="col">date rep day</th> <th scope="col">cases weekly</th> <th scope="col">deaths weekly</th> <th scope="col">population data 2019</th> @@ -17,7 +19,9 @@ {% for o in page_data.items %} <tr> <td>{{ o.date_rep }}</td> - <td>{{ o.year }}</td> + <td>{{ o.date_rep_year }}</td> + <td>{{ o.date_rep_month }}</td> + <td>{{ o.date_rep_day }}</td> <td>{{ o.cases }}</td> <td>{{ o.deaths }}</td> <td>{{ o.pop_data_2019 }}</td> diff --git a/src/covid19/blueprints/rki_cases/templates/rki/rki_imported.html b/src/covid19/blueprints/rki_cases/templates/rki/rki_imported.html index f45c2abc..b3ffd15a 100644 --- a/src/covid19/blueprints/rki_cases/templates/rki/rki_imported.html +++ b/src/covid19/blueprints/rki_cases/templates/rki/rki_imported.html @@ -57,27 +57,37 @@ <table class="table table-hover table-striped"> <thead> <tr> - <th scope="col">date_reported</th> - <th scope="col">country_code</th> - <th scope="col">country</th> - <th scope="col">who_region</th> - <th scope="col">new_cases</th> - <th scope="col">cumulative_cases</th> - <th scope="col">new_deaths</th> - <th scope="col">cumulative_deaths</th> + <th scope="col">bundesland</th> + <th scope="col">landkreis</th> + <th scope="col">altersgruppe</th> + <th scope="col">geschlecht</th> + <th scope="col">anzahl fall</th> + <th scope="col">anzahl todesfall</th> + <th scope="col">meldedatum</th> + <th scope="col">neuer fall</th> + <th scope="col">neuer todesfall</th> + <th scope="col">neu genesen</th> + <th scope="col">anzahl genesen</th> + <th scope="col">ist erkrankungsbeginn</th> + <th scope="col">altersgruppe2</th> </tr> </thead> <tbody> {% for who_global_data_import in page_data.items %} <tr> - <td>{{ who_global_data_import.date_reported }}</td> - <td>{{ who_global_data_import.country_code }}</td> - <td>{{ who_global_data_import.country }}</td> - <td>{{ who_global_data_import.who_region }}</td> - <td>{{ who_global_data_import.new_cases }}</td> - <td>{{ who_global_data_import.cumulative_cases }}</td> - <td>{{ who_global_data_import.new_deaths }}</td> - <td>{{ who_global_data_import.cumulative_deaths }}</td> + <td>{{ who_global_data_import.bundesland }}</td> + <td>{{ who_global_data_import.landkreis }}</td> + <td>{{ who_global_data_import.altersgruppe }}</td> + <td>{{ who_global_data_import.geschlecht }}</td> + <td>{{ who_global_data_import.anzahl_fall }}</td> + <td>{{ who_global_data_import.anzahl_todesfall }}</td> + <td>{{ who_global_data_import.meldedatum }}</td> + <td>{{ who_global_data_import.neuer_fall }}</td> + <td>{{ who_global_data_import.neuer_todesfall }}</td> + <td>{{ who_global_data_import.neu_genesen }}</td> + <td>{{ who_global_data_import.anzahl_genesen }}</td> + <td>{{ who_global_data_import.ist_erkrankungsbeginn }}</td> + <td>{{ who_global_data_import.altersgruppe2 }}</td> </tr> {% endfor %} </tbody> -- GitLab