Commit 78eb2a6288dcdde43a70954fd9c0ef0afc2e0495

Authored by Antoine Goutenoir
1 parent 0c5ac2ae
Exists in master

Use the counter.

Showing 1 changed file with 4 additions and 1 deletions   Show diff stats
flaskr/controllers/main_controller.py
... ... @@ -12,7 +12,8 @@ from flaskr.forms import LoginForm, EstimateForm
12 12 from flaskr.models import db, User, Estimation, StatusEnum, ScenarioEnum
13 13 from flaskr.geocoder import CachedGeocoder
14 14  
15   -from flaskr.core import generate_unique_id, get_emission_models
  15 +from flaskr.core import generate_unique_id, \
  16 + get_emission_models, increment_hit_counter
16 17 from flaskr.content import content
17 18  
18 19 from wtforms import validators
... ... @@ -33,6 +34,7 @@ OUT_ENCODING = 'utf-8'
33 34  
34 35  
35 36 # -----------------------------------------------------------------------------
  37 +# -----------------------------------------------------------------------------
36 38  
37 39  
38 40 @main.route('/favicon.ico')
... ... @@ -53,6 +55,7 @@ def home():
53 55 models_dict = {}
54 56 for model in models:
55 57 models_dict[model.slug] = model.__dict__
  58 + increment_hit_counter()
56 59 return render_template(
57 60 'home.html',
58 61 models=models_dict,
... ...