summaryrefslogtreecommitdiffstats
path: root/apps/patchwork/models.py
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2010-10-31 19:29:29 -0400
committerJeremy Kerr <jk@ozlabs.org>2011-04-14 17:21:04 +0800
commitc2c6a408c7764fa29389ce160f52776c9308d50a (patch)
tree1c47388b5494210aeed87f56f0c8b6e9fbeb4633 /apps/patchwork/models.py
parent56e2243f3be7e859666ce0e4e1a8b8b94444f8d4 (diff)
downloadpatchwork-c2c6a408c7764fa29389ce160f52776c9308d50a.tar.bz2
patchwork-c2c6a408c7764fa29389ce160f52776c9308d50a.tar.xz
registration: use EmailConfimation rather than separate registration app
Since we have infrastructure for email confirmations, we no longer need the separate registration app. Requires a migration script, which will delete all inactive users, including those newly added and pending confirmation. Use carefully. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'apps/patchwork/models.py')
-rw-r--r--apps/patchwork/models.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/patchwork/models.py b/apps/patchwork/models.py
index ee6748f..806875b 100644
--- a/apps/patchwork/models.py
+++ b/apps/patchwork/models.py
@@ -21,6 +21,7 @@ from django.db import models
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.contrib.sites.models import Site
+from django.conf import settings
from patchwork.parser import hash_patch
import re
@@ -374,9 +375,10 @@ class BundlePatch(models.Model):
ordering = ['order']
class EmailConfirmation(models.Model):
- validity = datetime.timedelta(days = 30)
+ validity = datetime.timedelta(days = settings.CONFIRMATION_VALIDITY_DAYS)
type = models.CharField(max_length = 20, choices = [
('userperson', 'User-Person association'),
+ ('registration', 'Registration'),
])
email = models.CharField(max_length = 200)
user = models.ForeignKey(User, null = True)