from django.core.management.base import BaseCommand from email.mime.image import MIMEImage from apps.notification.utils import send_email class Command(BaseCommand): help = 'Send certificates at the end of subscription' def handle(self, *args, **options): image = MIMEImage(cms.image.open().read())