]> git.parisson.com Git - teleforma.git/commitdiff
add args
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Wed, 22 Nov 2023 17:05:44 +0000 (18:05 +0100)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Wed, 22 Nov 2023 17:05:44 +0000 (18:05 +0100)
teleforma/management/commands/teleforma-reset-all-passwords-with-mail.py
teleforma/management/commands/teleforma-send-payment-emails.py
teleforma/management/commands/teleforma-send-subscription-email.py
teleforma/management/commands/teleforma-students-activate.py

index 6366fbb421f0c0f3577a2a70ad21371e8e535069..16449e19cdb4bf33f5896d5f46612e7b8827aeff 100644 (file)
@@ -39,6 +39,9 @@ class Command(BaseCommand):
         message = render_to_string(self.message_template, ctx_dict)
         send_mail(subject, message, settings.DEFAULT_FROM_EMAIL, [user.email], fail_silently=False)
 
+    def add_arguments(self, parser):
+        parser.add_argument('args', nargs='*')
+
     def handle(self, *args, **options):
         log_file = args[-1]
         period_name = args[-2]
index bdb024b9c7d137d50de1306efe8dd945e0e0fbe7..95db695a220f89fbfa08a50456cb277c151ea5f4 100644 (file)
@@ -39,6 +39,7 @@ class Command(BaseCommand):
         message = render_to_string(message_template, ctx_dict)
         send_mail(subject, message, settings.DEFAULT_FROM_EMAIL, [student.user.email], fail_silently=False)
 
+
     def handle(self, *args, **options):
         log_file = options['log_file']
         logger = Logger(log_file)
index fcc0178f636c2fce16782b69a2500d92d1e13a1a..2fc583f12e6d7ced9b0af9f8d278d0fe0a710d27 100644 (file)
@@ -46,6 +46,9 @@ class Command(BaseCommand):
         message = render_to_string(message_template, ctx_dict)
         send_mail(subject, message, settings.DEFAULT_FROM_EMAIL, [student.user.email], fail_silently=False)
 
+    def add_arguments(self, parser):
+        parser.add_argument('args', nargs='*')
+
     def handle(self, *args, **options):
         log_file = args[-1]
         period_name = args[-2]
index 16be2daa63047e6cb8aad457a058adfaa7684d6e..03e1bf8e9c9b86c1cf4f37c0b44c94660db43332 100644 (file)
@@ -28,6 +28,9 @@ class Logger:
 class Command(BaseCommand):
     help = "Activate all user account for subscribed students"
 
+    def add_arguments(self, parser):
+        parser.add_argument('args', nargs='*')
+
     def handle(self, *args, **options):
         period_name = args[-2]
         log_file = args[-1]