|
@@ -35,15 +35,17 @@ class Command(BaseCommand):
|
|
|
date,
|
|
|
date + relativedelta(months=+1)]
|
|
|
|
|
|
- self.stdout.write("Selecting members whose membership fee end at the "
|
|
|
- "following dates : {dates}".format(
|
|
|
- dates=[str(d) for d in end_dates]))
|
|
|
+ if options['verbosity'] >= 2:
|
|
|
+ self.stdout.write("Selecting members whose membership fee end at "
|
|
|
+ "the following dates : {dates}".format(
|
|
|
+ dates=[str(d) for d in end_dates]))
|
|
|
|
|
|
members = Member.objects.filter(status='member')\
|
|
|
.annotate(end=Max('membership_fees__end_date'))\
|
|
|
.filter(end__in=end_dates)
|
|
|
- self.stdout.write(
|
|
|
- "Got {number} members.".format(number=members.count()))
|
|
|
+ if options['verbosity'] >= 2:
|
|
|
+ self.stdout.write(
|
|
|
+ "Got {number} members.".format(number=members.count()))
|
|
|
|
|
|
cpt = 0
|
|
|
with respect_language(settings.LANGUAGE_CODE):
|
|
@@ -54,5 +56,6 @@ class Command(BaseCommand):
|
|
|
member=member, email=member.email))
|
|
|
cpt = cpt + 1
|
|
|
|
|
|
- self.stdout.write("{number} call for membership fees emails were "
|
|
|
- "sent".format(number=cpt))
|
|
|
+ if cpt > 0 or options['verbosity'] >= 2:
|
|
|
+ self.stdout.write("{number} call for membership fees emails were "
|
|
|
+ "sent".format(number=cpt))
|