From 78eb2a6288dcdde43a70954fd9c0ef0afc2e0495 Mon Sep 17 00:00:00 2001 From: Antoine Goutenoir Date: Mon, 20 Jan 2020 18:14:05 +0100 Subject: [PATCH] Use the counter. --- flaskr/controllers/main_controller.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flaskr/controllers/main_controller.py b/flaskr/controllers/main_controller.py index d460c0b..a80f0d2 100644 --- a/flaskr/controllers/main_controller.py +++ b/flaskr/controllers/main_controller.py @@ -12,7 +12,8 @@ from flaskr.forms import LoginForm, EstimateForm from flaskr.models import db, User, Estimation, StatusEnum, ScenarioEnum from flaskr.geocoder import CachedGeocoder -from flaskr.core import generate_unique_id, get_emission_models +from flaskr.core import generate_unique_id, \ + get_emission_models, increment_hit_counter from flaskr.content import content from wtforms import validators @@ -33,6 +34,7 @@ OUT_ENCODING = 'utf-8' # ----------------------------------------------------------------------------- +# ----------------------------------------------------------------------------- @main.route('/favicon.ico') @@ -53,6 +55,7 @@ def home(): models_dict = {} for model in models: models_dict[model.slug] = model.__dict__ + increment_hit_counter() return render_template( 'home.html', models=models_dict, -- libgit2 0.21.2