diff --git a/app.py b/app.py index 66a2fea217bb8f4ebfeed4d064a2870173e08351..5c7e2deba9357b241c2681f8cb38f0462cb37aee 100644 --- a/app.py +++ b/app.py @@ -283,6 +283,19 @@ def url_europe_date_reported(page=1): page_info=page_info) +@app.route('/europe/date_reported/<int:europe_date_reported_id>/page/<int:page>') +@app.route('/europe/date_reported/<int:europe_date_reported_id>') +def url_europe_date_reported_one(europe_date_reported_id, page=1): + page_info = ApplicationPage('Europe', "date_reported") + europe_date_reported = EuropeDateReported.get_by_id(europe_date_reported_id) + page_data = EuropeData.find_by_date_reported(europe_date_reported) + return render_template( + 'europe/europe_date_reported_one.html', + europe_date_reported=europe_date_reported, + page_data=page_data, + page_info=page_info) + + @app.route('/europe/continent/page/<int:page>') @app.route('/europe/continent') def url_europe_continent(page=1): diff --git a/org/woehlke/covid19/europe/europe_model.py b/org/woehlke/covid19/europe/europe_model.py index 257f078060434c3c562ffd13809cafe1f1b050bc..fa815a1c6a127cbecea749ce27c482cf3ebfa336 100644 --- a/org/woehlke/covid19/europe/europe_model.py +++ b/org/woehlke/covid19/europe/europe_model.py @@ -212,3 +212,8 @@ class EuropeData(db.Model): def get_by_id(cls, other_id): return db.session.query(cls).filter(cls.id == other_id).one() + @classmethod + def find_by_date_reported(cls, europe_date_reported): + return db.session.query(cls).filter( + cls.europe_date_reported_id == europe_date_reported.id).all() + diff --git a/templates/europe/europe_date_reported_one.html b/templates/europe/europe_date_reported_one.html new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391