django-model-stats

Display how often models and model fields are used in the database
git clone https://git.ce9e.org/django-model-stats.git

commit
b93b1c280dad976ae1b2740c3698d79df1793151
parent
d9cb1a16222d8c14941f7f062a083e8cf086ad94
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2023-11-05 10:44
lint

Diffstat

M model_stats/views.py 6 +++---

1 files changed, 3 insertions, 3 deletions


diff --git a/model_stats/views.py b/model_stats/views.py

@@ -1,14 +1,14 @@
    1    -1 from django.template.response import TemplateResponse
    2     1 from django.contrib.admin.views.decorators import staff_member_required
    3    -1 from django.contrib.contenttypes.models import ContentType
    4     2 from django.contrib.contenttypes.fields import GenericForeignKey
   -1     3 from django.contrib.contenttypes.models import ContentType
   -1     4 from django.template.response import TemplateResponse
    5     5 
    6     6 
    7     7 def percent(part, total):
    8     8     if total == 0:
    9     9         return None
   10    10     p = part * 100 // total
   11    -1     return '{}%'.format(p)
   -1    11     return f'{p}%'
   12    12 
   13    13 
   14    14 def get_stats():