X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=apps%2Fpatchwork%2Fmodels.py;fp=apps%2Fpatchwork%2Fmodels.py;h=f21d07322c544d3860a3128f65f76a7faa12b880;hb=41f19b6643b44768dc06561c992c04ed6148477d;hp=806875bb00009eb911e84e0f50cf71d5063dc41e;hpb=c2c6a408c7764fa29389ce160f52776c9308d50a;p=patchwork diff --git a/apps/patchwork/models.py b/apps/patchwork/models.py index 806875b..f21d073 100644 --- a/apps/patchwork/models.py +++ b/apps/patchwork/models.py @@ -379,6 +379,7 @@ class EmailConfirmation(models.Model): type = models.CharField(max_length = 20, choices = [ ('userperson', 'User-Person association'), ('registration', 'Registration'), + ('optout', 'Email opt-out'), ]) email = models.CharField(max_length = 200) user = models.ForeignKey(User, null = True) @@ -400,4 +401,8 @@ class EmailConfirmation(models.Model): self.key = self._meta.get_field('key').construct(str).hexdigest() super(EmailConfirmation, self).save() +class EmailOptout(models.Model): + email = models.CharField(max_length = 200, primary_key = True) + def __unicode__(self): + return self.email