From e4d53e67916f295a972160f0c039b85a0ef9f7f2 Mon Sep 17 00:00:00 2001 From: Hugo LEVY-FALK Date: Mon, 16 Apr 2018 23:57:22 +0200 Subject: [PATCH] Fix #86 --- machines/templates/machines/aff_machines.html | 1 - users/templates/users/profil.html | 2 +- users/views.py | 2 ++ 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/machines/templates/machines/aff_machines.html b/machines/templates/machines/aff_machines.html index f6da4165..56eec21d 100644 --- a/machines/templates/machines/aff_machines.html +++ b/machines/templates/machines/aff_machines.html @@ -28,7 +28,6 @@ with this program; if not, write to the Free Software Foundation, Inc., {% include "pagination.html" with list=machines_list %} {% endif %} - diff --git a/users/templates/users/profil.html b/users/templates/users/profil.html index 169524f5..abba61a2 100644 --- a/users/templates/users/profil.html +++ b/users/templates/users/profil.html @@ -245,7 +245,7 @@ non adhérent{% endif %} et votre connexion est {% if users.has_access %}

Machines - {{machines_list.count}} + {{nb_machines}}

diff --git a/users/views.py b/users/views.py index a86a6e47..2614cb9c 100644 --- a/users/views.py +++ b/users/views.py @@ -814,6 +814,7 @@ def profil(request, users, **_kwargs): pagination_large_number = GeneralOption.get_cached_value( 'pagination_large_number' ) + nb_machines = machines.count() machines = re2o_paginator(request, machines, pagination_large_number) factures = Facture.objects.filter(user=users) factures = SortTable.sort( @@ -844,6 +845,7 @@ def profil(request, users, **_kwargs): { 'users': users, 'machines_list': machines, + 'nb_machines' : nb_machines, 'facture_list': factures, 'ban_list': bans, 'white_list': whitelists,