Browse Source

Merge branch 'master' of gitea.planet-casio.com:devs/PCv5

master
Darks 1 month ago
parent
commit
ad1042865b
Signed by: Darks <l.gatin@neuf.fr> GPG Key ID: F61F10FA138E797C
2 changed files with 16 additions and 0 deletions
  1. +13
    -0
      app/__init__.py
  2. +3
    -0
      app/templates/base/footer.html

+ 13
- 0
app/__init__.py View File

@@ -6,10 +6,14 @@ from flask_mail import Mail
from config import Config
import time
<<<<<<< HEAD
<<<<<<< HEAD
import slugify
=======

>>>>>>> e15005a... Ajout des stats sur la durée de chargement
=======

>>>>>>> e15005a427f95829bbbad8f0d625ab9cb0c30e69

app = Flask(__name__)
app.config.from_object(Config)
@@ -23,6 +27,12 @@ migrate = Migrate(app, db)
mail = Mail(app)


@app.before_request
def request_time():
g.request_start_time = time.time()
g.request_time = lambda: "%.5fs" % (time.time() - g.request_start_time)


@app.before_request
def request_time():
g.request_start_time = time.time()
@@ -32,6 +42,7 @@ login = LoginManager(app)
login.login_view = 'login'
login.login_message = "Veuillez vous authentifier avant de continuer."

<<<<<<< HEAD
<<<<<<< HEAD
from app.utils.converters import *
app.url_map.converters['forum'] = ForumConverter
@@ -47,6 +58,8 @@ from app.processors.menu import menu_processor
from app.processors.utilities import utilities_processor
=======
>>>>>>> e15005a... Ajout des stats sur la durée de chargement
=======
>>>>>>> e15005a427f95829bbbad8f0d625ab9cb0c30e69

from app import models # IDK why this is here, but it works
from app.models.comment import Comment


+ 3
- 0
app/templates/base/footer.html View File

@@ -4,8 +4,11 @@
{% if current_user.is_authenticated and current_user.priv('footer-statistics') %}
<p>Page générée en {{ g.request_time() }}</p>
{% endif %}
<<<<<<< HEAD
<<<<<<< HEAD
<p>Ceci est un environnement de test. Tout contenu peut être supprimé sans avertissement préalable.</p>
=======
>>>>>>> e15005a... Ajout des stats sur la durée de chargement
=======
>>>>>>> e15005a427f95829bbbad8f0d625ab9cb0c30e69
</footer>

Loading…
Cancel
Save