1
0
mirror of https://gitlab.crans.org/bde/nk20-scripts synced 2025-06-29 09:50:54 +02:00

Adapt verbosity of some scripts

Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
2021-04-14 15:18:24 +02:00
parent 13322189dc
commit cf8b05d20a
5 changed files with 20 additions and 15 deletions

View File

@ -23,7 +23,8 @@ class Command(BaseCommand):
for d in queryset.all():
button_id = d["template"]
button = TransactionTemplate.objects.get(pk=button_id)
self.stdout.write(self.style.WARNING("Highlight button {name} ({count:d} transactions)..."
.format(name=button.name, count=d["transaction_count"])))
if kwargs['verbosity'] > 0:
self.stdout.write(self.style.WARNING("Highlight button {name} ({count:d} transactions)..."
.format(name=button.name, count=d["transaction_count"])))
button.highlighted = True
button.save()