summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-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>