From 5f38bc649522f57e90164734a0b0dd310b9303aa Mon Sep 17 00:00:00 2001 From: thomaswoehlke <thomas.woehlke@gmail.com> Date: Sat, 3 Apr 2021 16:43:23 +0200 Subject: [PATCH] update data --- src/covid19/blueprints/ecdc/ecdc_model.py | 3 +++ .../ecdc/fragments/fragment_ecdc_table_continent.html | 2 +- .../templates/ecdc/fragments/fragment_ecdc_table_country.html | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/covid19/blueprints/ecdc/ecdc_model.py b/src/covid19/blueprints/ecdc/ecdc_model.py index cdc20750..8c1b86fb 100644 --- a/src/covid19/blueprints/ecdc/ecdc_model.py +++ b/src/covid19/blueprints/ecdc/ecdc_model.py @@ -21,6 +21,9 @@ class EcdcDateReported(ApplicationDateReported): day_of_week = db.Column(db.Integer, nullable=False) week_of_year = db.Column(db.Integer, nullable=False) + def get_name_for_datum(self): + return self.date_reported + def get_date_import_format_from_date_reported(self): my_date_parts = self.date_reported.split("-") my_year = my_date_parts[0] diff --git a/src/covid19/blueprints/ecdc/templates/ecdc/fragments/fragment_ecdc_table_continent.html b/src/covid19/blueprints/ecdc/templates/ecdc/fragments/fragment_ecdc_table_continent.html index 2b8cada6..c8cc93b0 100644 --- a/src/covid19/blueprints/ecdc/templates/ecdc/fragments/fragment_ecdc_table_continent.html +++ b/src/covid19/blueprints/ecdc/templates/ecdc/fragments/fragment_ecdc_table_continent.html @@ -10,7 +10,7 @@ <td> <!-- TODO: change URL to for_url() --> <a href="/ecdc/continent/{{ europe_continent.id }}"> - {{ europe_continent.continent_exp }} + {{ europe_continent.region }} </a> </td> </tr> diff --git a/src/covid19/blueprints/ecdc/templates/ecdc/fragments/fragment_ecdc_table_country.html b/src/covid19/blueprints/ecdc/templates/ecdc/fragments/fragment_ecdc_table_country.html index 7676b453..a55aaa9d 100644 --- a/src/covid19/blueprints/ecdc/templates/ecdc/fragments/fragment_ecdc_table_country.html +++ b/src/covid19/blueprints/ecdc/templates/ecdc/fragments/fragment_ecdc_table_country.html @@ -31,7 +31,7 @@ </td> <td> <a href="/ecdc/continent/{{ europe_country.continent.id }}"> - {{ europe_country.continent.continent_exp }} + {{ europe_country.continent.region }} </a> </td> </tr> -- GitLab