1 # This file is part of Wolne Lektury, licensed under GNU Affero GPLv3 or later.
2 # Copyright © Fundacja Wolne Lektury. See NOTICE for more information.
6 from django.db import models
7 from django.conf import settings
10 class Subscription(models.Model):
11 email = models.EmailField(verbose_name='adres e-mail', unique=True)
12 active = models.BooleanField(default=True, verbose_name='aktywna')
13 created_at = models.DateTimeField(auto_now_add=True)
14 last_modified = models.DateTimeField(auto_now=True)
17 verbose_name = 'subskrypcja'
18 verbose_name_plural = 'subskrypcje'
24 return hashlib.sha224(self.email + settings.SECRET_KEY).hexdigest()[:30]
27 class Newsletter(models.Model):
28 slug = models.SlugField(blank=True)
29 page_title = models.CharField(max_length=255, blank=True)
30 phplist_id = models.IntegerField(null=True, blank=True)
31 crm_id = models.IntegerField(null=True, blank=True)