8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-27 07:02:26 +00:00

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.
This commit is contained in:
Maël Kervella 2018-04-10 13:47:38 +00:00
parent 33a75494e4
commit 91faad5806

View file

@ -313,11 +313,11 @@ def stats_models(request):
'whitelist': [Whitelist.PRETTY_NAME, Whitelist.objects.count()] 'whitelist': [Whitelist.PRETTY_NAME, Whitelist.objects.count()]
}, },
'Cotisations': { 'Cotisations': {
'factures': [Facture.PRETTY_NAME, Facture.objects.count()], 'factures': [Facture._meta.verbose_name.title(), Facture.objects.count()],
'vente': [Vente.PRETTY_NAME, Vente.objects.count()], 'vente': [Vente._meta.verbose_name.title(), Vente.objects.count()],
'cotisation': [Cotisation.PRETTY_NAME, Cotisation.objects.count()], 'cotisation': [Cotisation._meta.verbose_name.title(), Cotisation.objects.count()],
'article': [Article.PRETTY_NAME, Article.objects.count()], 'article': [Article._meta.verbose_name.title(), Article.objects.count()],
'banque': [Banque.PRETTY_NAME, Banque.objects.count()], 'banque': [Banque._meta.verbose_name.title(), Banque.objects.count()],
}, },
'Machines': { 'Machines': {
'machine': [Machine.PRETTY_NAME, Machine.objects.count()], 'machine': [Machine.PRETTY_NAME, Machine.objects.count()],