diff options
| -rw-r--r-- | management/commands/sendmails.py | 4 | 
1 files changed, 3 insertions, 1 deletions
| diff --git a/management/commands/sendmails.py b/management/commands/sendmails.py index b42d3d5..a134d80 100644 --- a/management/commands/sendmails.py +++ b/management/commands/sendmails.py @@ -1,6 +1,6 @@  from django.core.management.base import BaseCommand, CommandError  from django.core.mail import send_mass_mail -from django.utils import timezone +from django.utils import timezone, translation  from django.template import Context, loader  from django.conf import settings @@ -14,6 +14,8 @@ class Command(BaseCommand):      help = "Sends emails to subscribed users"      def handle(self, *args, **options): +        translation.activate(settings.LANGUAGE_CODE) +          year, week, day = timezone.now().isocalendar()          if day >= 6:              year, week, _ = (timezone.now() + datetime.timedelta(weeks=1)).isocalendar() | 
