aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorubq323 <ubq323>2021-07-18 14:15:18 +0000
committerubq323 <ubq323>2021-07-18 14:15:18 +0000
commit8d2e7d0f6562f42730b8bc62576f10e7d06e5117 (patch)
treee9bca3f7d1ef2eecafbe09f93416da827394af8c
parent589dae7625f7f98ee3d546887792db3dfc90b464 (diff)
minor change things
-rw-r--r--apioforum/__init__.py3
-rw-r--r--apioforum/templates/view_forum.html2
2 files changed, 4 insertions, 1 deletions
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 @@
<desc>
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}}
</desc>