summaryrefslogtreecommitdiffstats
path: root/apps/patchwork/views/base.py
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2010-08-11 14:16:28 +0800
committerJeremy Kerr <jk@ozlabs.org>2011-04-14 17:23:04 +0800
commit41f19b6643b44768dc06561c992c04ed6148477d (patch)
tree6f1c3d1fbe5e15e53d3c028a8e654f05b19e68fb /apps/patchwork/views/base.py
parentc2c6a408c7764fa29389ce160f52776c9308d50a (diff)
downloadpatchwork-41f19b6643b44768dc06561c992c04ed6148477d.tar.bz2
patchwork-41f19b6643b44768dc06561c992c04ed6148477d.tar.xz
Add email opt-out system
We're going to start generating emails on patchwork updates, so firstly allow people to opt-out of all patchwork communications. We do this with a 'mail settings' interface, allowing non-registered users to set preferences on their email address. Logged-in users can do this through the user profile view. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'apps/patchwork/views/base.py')
-rw-r--r--apps/patchwork/views/base.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/patchwork/views/base.py b/apps/patchwork/views/base.py
index 590a3b6..82c0368 100644
--- a/apps/patchwork/views/base.py
+++ b/apps/patchwork/views/base.py
@@ -59,10 +59,12 @@ def pwclient(request):
return response
def confirm(request, key):
- import patchwork.views.user
+ import patchwork.views.user, patchwork.views.mail
views = {
'userperson': patchwork.views.user.link_confirm,
'registration': patchwork.views.user.register_confirm,
+ 'optout': patchwork.views.mail.optout_confirm,
+ 'optin': patchwork.views.mail.optin_confirm,
}
conf = get_object_or_404(EmailConfirmation, key = key)