diff --git a/covid19/blueprints/admin/admin_views.py b/covid19/blueprints/admin/admin_views.py index dbf157a0de695edf400e2481e5e6795fa8748e24..98e5a11758d273c9b72f33573c1dbb1312921618 100644 --- a/covid19/blueprints/admin/admin_views.py +++ b/covid19/blueprints/admin/admin_views.py @@ -50,50 +50,50 @@ def task_admin_database_drop_create(self): return result -@app_admin.route('/admin/tasks') +@app_admin.route('/tasks') def url_admin_tasks(): page_info = ApplicationPage('Admin', "Tasks") return render_template( - 'templates/admin/admin_tasks.html', + 'admin/admin_tasks.html', page_info=page_info) -@app_admin.route('/admin/info') +@app_admin.route('/info') def url_admin_info(): page_info = ApplicationPage('Admin', "Info") return render_template( - 'templates/admin/admin_info.html', + 'admin/admin_info.html', page_info=page_info) -@app_admin.route('/admin/alive_message') +@app_admin.route('/alive_message') def url_alive_message_start(): app.logger.info("url_alive_message_start [start]") task_admin_alive_message.apply_async() flash("alive_message_task started") app.logger.info("url_alive_message_start [done]") - return redirect(url_for('url_admin_tasks')) + return redirect(url_for('admin.url_admin_tasks')) -@app_admin.route('/admin/database/dump') +@app_admin.route('/database/dump') def url_admin_database_dump(): app.logger.info("url_admin_database_dump [start]") admin_service.run_admin_database_dump() flash("admin_service.run_admin_database_dump started") app.logger.info("url_admin_database_dump [done]") - return redirect(url_for('url_admin_tasks')) + return redirect(url_for('admin.url_admin_tasks')) -@app_admin.route('/admin/database/import') +@app_admin.route('/database/import') def url_admin_database_import(): app.logger.info("url_admin_database_import [start]") admin_service.run_admin_database_import() flash("admin_service.run_admin_database_import started") app.logger.info("url_admin_database_import [done]") - return redirect(url_for('url_admin_tasks')) + return redirect(url_for('admin.url_admin_tasks')) -@app_admin.route('/admin/database/drop') +@app_admin.route('/database/drop') def url_admin_database_drop(): app.logger.info("url_admin_database_drop [start]") flash("admin_service.run_admin_database_drop started") @@ -110,4 +110,4 @@ def url_admin_database_drop(): flash("task_admin_database_drop_create async started") task_admin_database_drop_create.apply_async() app.logger.info("url_admin_database_drop [done]") - return redirect(url_for('url_admin_tasks')) + return redirect(url_for('admin.url_admin_tasks')) diff --git a/covid19/blueprints/europe/europe_views.py b/covid19/blueprints/europe/europe_views.py index b67b93d37440fdc2a9fdeb61862dfc069f80f44e..852bc29ae017d53c75e05f5721c422aa68ca5288 100644 --- a/covid19/blueprints/europe/europe_views.py +++ b/covid19/blueprints/europe/europe_views.py @@ -51,7 +51,7 @@ def task_europe_update_short(self): def url_europe_info(): page_info = ApplicationPage('Europe', "Info") return render_template( - 'templates/europe/europe_info.html', + 'europe/europe_info.html', title='Europe', page_info=page_info) @@ -60,7 +60,7 @@ def url_europe_info(): def url_europe_tasks(): page_info = ApplicationPage('Europe', "Tasks") return render_template( - 'templates/europe/europe_tasks.html', + 'europe/europe_tasks.html', title='Europe Tasks', page_info=page_info) @@ -79,7 +79,7 @@ def url_europe_data_imported(page=1): page_info = ApplicationPage('Europe', "Last Import") page_data = EuropeDataImportTable.get_all_as_page(page) return render_template( - 'templates/europe/europe_imported.html', + 'europe/europe_imported.html', page_data=page_data, page_info=page_info) @@ -90,7 +90,7 @@ def url_europe_date_reported_all(page=1): page_info = ApplicationPage('Europe', "date_reported") page_data = EuropeDateReported.get_all_as_page(page) return render_template( - 'templates/europe/date_reported/europe_date_reported_all.html', + 'europe/date_reported/europe_date_reported_all.html', page_data=page_data, page_info=page_info) @@ -104,7 +104,7 @@ def url_europe_date_reported_one_notification_rate(europe_date_reported_id, page europe_date_reported = EuropeDateReported.get_by_id(europe_date_reported_id) page_data = EuropeData.find_by_date_reported_notification_rate(europe_date_reported, page) return render_template( - 'templates/europe/date_reported/europe_date_reported_one_notification_rate.html', + 'europe/date_reported/europe_date_reported_one_notification_rate.html', europe_date_reported=europe_date_reported, page_data=page_data, page_info=page_info) @@ -117,7 +117,7 @@ def url_europe_date_reported_one_deaths_weekly(europe_date_reported_id, page=1): europe_date_reported = EuropeDateReported.get_by_id(europe_date_reported_id) page_data = EuropeData.find_by_date_reported_deaths_weekly(europe_date_reported, page) return render_template( - 'templates/europe/date_reported/europe_date_reported_one_deaths_weekly.html', + 'europe/date_reported/europe_date_reported_one_deaths_weekly.html', europe_date_reported=europe_date_reported, page_data=page_data, page_info=page_info) @@ -130,7 +130,7 @@ def url_europe_date_reported_one_cases_weekly(europe_date_reported_id, page=1): europe_date_reported = EuropeDateReported.get_by_id(europe_date_reported_id) page_data = EuropeData.find_by_date_reported_cases_weekly(europe_date_reported, page) return render_template( - 'templates/europe/date_reported/europe_date_reported_one_cases_weekly.html', + 'europe/date_reported/europe_date_reported_one_cases_weekly.html', europe_date_reported=europe_date_reported, page_data=page_data, page_info=page_info) @@ -142,7 +142,7 @@ def url_europe_continent_all(page=1): page_info = ApplicationPage('Europe', "continent") page_data = EuropeContinent.get_all_as_page(page) return render_template( - 'templates/europe/continent/europe_continent_all.html', + 'europe/continent/europe_continent_all.html', page_data=page_data, page_info=page_info) @@ -154,7 +154,7 @@ def url_europe_continent_one(continent_id, page=1): continent = EuropeContinent.get_by_id(continent_id) page_data = EuropeCountry.find_by_continent(continent, page) return render_template( - 'templates/europe/continent/europe_continent_one.html', + 'europe/continent/europe_continent_one.html', continent=continent, page_data=page_data, page_info=page_info) @@ -166,7 +166,7 @@ def url_europe_country_all(page=1): page_info = ApplicationPage('Europe', "country") page_data = EuropeCountry.get_all_as_page(page) return render_template( - 'templates/europe/country/europe_country_all.html', + 'europe/country/europe_country_all.html', page_data=page_data, page_info=page_info) @@ -178,7 +178,7 @@ def url_europe_country_one(country_id, page=1): europe_country = EuropeCountry.get_by_id(country_id) page_data = EuropeData.find_by_country(europe_country, page) return render_template( - 'templates/europe/country/europe_country_one.html', + 'europe/country/europe_country_one.html', europe_country=europe_country, page_data=page_data, page_info=page_info) @@ -194,7 +194,7 @@ def url_europe_country_germany(page=1): return redirect(url_for('url_europe_tasks')) page_data = EuropeData.find_by_country(europe_country, page) return render_template( - 'templates/europe/country/europe_country_germany.html', + 'europe/country/europe_country_germany.html', europe_country=europe_country, page_data=page_data, page_info=page_info)