forked from DGNum/gestioCOF
syncmails should be able to be silent
This commit is contained in:
parent
776ff28141
commit
c239f28f17
1 changed files with 9 additions and 7 deletions
|
@ -63,8 +63,9 @@ class Command(BaseCommand):
|
||||||
except CustomMail.DoesNotExist:
|
except CustomMail.DoesNotExist:
|
||||||
mail = CustomMail.objects.create(**fields)
|
mail = CustomMail.objects.create(**fields)
|
||||||
status['synced'] += 1
|
status['synced'] += 1
|
||||||
self.stdout.write(
|
if options['verbosity']:
|
||||||
'SYNCED {:s}'.format(fields['shortname']))
|
self.stdout.write(
|
||||||
|
'SYNCED {:s}'.format(fields['shortname']))
|
||||||
assoc['mails'][obj['pk']] = mail
|
assoc['mails'][obj['pk']] = mail
|
||||||
|
|
||||||
# Variables
|
# Variables
|
||||||
|
@ -79,8 +80,9 @@ class Command(BaseCommand):
|
||||||
except Variable.DoesNotExist:
|
except Variable.DoesNotExist:
|
||||||
Variable.objects.create(**fields)
|
Variable.objects.create(**fields)
|
||||||
|
|
||||||
# C'est agréable d'avoir le résultat affiché
|
if options['verbosity']:
|
||||||
self.stdout.write(
|
# C'est agréable d'avoir le résultat affiché
|
||||||
'{synced:d} mails synchronized {unchanged:d} unchanged'
|
self.stdout.write(
|
||||||
.format(**status)
|
'{synced:d} mails synchronized {unchanged:d} unchanged'
|
||||||
)
|
.format(**status)
|
||||||
|
)
|
||||||
|
|
Loading…
Reference in a new issue