From 91faad580666bf858b2a38145d3aa23b79011915 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Kervella?= Date: Tue, 10 Apr 2018 13:47:38 +0000 Subject: [PATCH] Replace Object.PRETTY_NAME with Object._meta.verbose_name.title() This is cleaner and closer to the way Django recommends to define names for the objects. --- logs/views.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/logs/views.py b/logs/views.py index 84ff8180..e07a2bb9 100644 --- a/logs/views.py +++ b/logs/views.py @@ -313,11 +313,11 @@ def stats_models(request): 'whitelist': [Whitelist.PRETTY_NAME, Whitelist.objects.count()] }, 'Cotisations': { - 'factures': [Facture.PRETTY_NAME, Facture.objects.count()], - 'vente': [Vente.PRETTY_NAME, Vente.objects.count()], - 'cotisation': [Cotisation.PRETTY_NAME, Cotisation.objects.count()], - 'article': [Article.PRETTY_NAME, Article.objects.count()], - 'banque': [Banque.PRETTY_NAME, Banque.objects.count()], + 'factures': [Facture._meta.verbose_name.title(), Facture.objects.count()], + 'vente': [Vente._meta.verbose_name.title(), Vente.objects.count()], + 'cotisation': [Cotisation._meta.verbose_name.title(), Cotisation.objects.count()], + 'article': [Article._meta.verbose_name.title(), Article.objects.count()], + 'banque': [Banque._meta.verbose_name.title(), Banque.objects.count()], }, 'Machines': { 'machine': [Machine.PRETTY_NAME, Machine.objects.count()],