1 from django.core.management.base import BaseCommand, CommandError
2 from messaging.models import EmailTemplate
5 class Command(BaseCommand):
6 help = 'Send emails defined in templates.'
8 def add_arguments(self, parser):
9 parser.add_argument('--dry-run', action='store_true', help='Dry run')
11 def handle(self, *args, **options):
12 for et in EmailTemplate.get_current().order_by('min_days_since'):
13 et.run(verbose=True, dry_run=options['dry_run'])