diff --git a/app/processors/utilities.py b/app/processors/utilities.py index bc28c70..b3483f5 100644 --- a/app/processors/utilities.py +++ b/app/processors/utilities.py @@ -4,6 +4,6 @@ from app import app def utilities_processor(): """ Add some utilities to render context """ return dict( - len=len, - enumerate=enumerate + # len=len, + # enumerate=enumerate ) diff --git a/app/templates/forum/forum.html b/app/templates/forum/forum.html index 45efe52..6fbceed 100644 --- a/app/templates/forum/forum.html +++ b/app/templates/forum/forum.html @@ -19,15 +19,15 @@ {{ t.title }} {{ t.author.name }} {{ t.date_created | date }} - {{ t.thread.comments | length }} + {{ t.thread.comments.count() }} {{ t.views }} {% endfor %} - {% elif len(f.sub_forums) == 0 %} + {% elif not f.sub_forums %}

Il n'y a aucun topic sur ce forum ! Animons-le vite !

{% endif %} - {% if len(f.sub_forums) > 0 %} + {% if f.sub_forums %}

Forums

@@ -41,7 +41,7 @@
{{ f.name }}Nombre de sujets
{% endif %} - {% if len(f.sub_forums) == 0 or (current_user.is_authenticated and current_user.priv('access-admin-board')) %} + {% if (not f.sub_forums) == 0 or (current_user.is_authenticated and current_user.priv('access-admin-board')) %}

Créer un nouveau sujet