From 8d2e7d0f6562f42730b8bc62576f10e7d06e5117 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Sun, 18 Jul 2021 14:15:18 +0000 Subject: minor change things --- apioforum/__init__.py | 3 +++ apioforum/templates/view_forum.html | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/apioforum/__init__.py b/apioforum/__init__.py index 6c9eaa8..364bad3 100644 --- a/apioforum/__init__.py +++ b/apioforum/__init__.py @@ -17,6 +17,9 @@ def create_app(): except OSError: pass + app.jinja_env.trim_blocks = True + app.jinja_env.lstrip_blocks = True + from . import db db.init_app(app) from . import permissions diff --git a/apioforum/templates/view_forum.html b/apioforum/templates/view_forum.html index 017d9f0..2e49a41 100644 --- a/apioforum/templates/view_forum.html +++ b/apioforum/templates/view_forum.html @@ -76,7 +76,7 @@ poll: {{poll.title}} {% for opt in poll.options %} - option "{{opt.text}}": {{opt.num}} votes + option "{{opt.text}}": {{opt.num or 0}} votes {% endfor %} total votes: {{total_votes}} -- cgit v1.2.3