remotes/origin/hotfix/LIL-691
gzbender 7 years ago
parent bb69b537d9
commit da151b718f
  1. 3
      apps/notification/management/commands/send_certificates.py
  2. 10
      apps/notification/models.py

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

@ -0,0 +1,10 @@
from django.db import models
from django.contrib.auth import get_user_model
User = get_user_model()
class UserNotification(models.Model):
user = models.ForeignKey(User, on_delete=models.CASCADE)
certificate_number = models.SmallIntegerField(blank=True, null=True)
certificate_last_email = models.DateTimeField(blank=True, null=True)
Loading…
Cancel
Save