fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Opt-out
[wolnelektury.git]
/
src
/
messaging
/
views.py
diff --git
a/src/messaging/views.py
b/src/messaging/views.py
index
31debe1
..
f3881bb
100644
(file)
--- a/
src/messaging/views.py
+++ b/
src/messaging/views.py
@@
-3,6
+3,8
@@
from django.http import JsonResponse
from django.urls import reverse
from django.shortcuts import render
from django.utils.translation import ugettext as _
from django.urls import reverse
from django.shortcuts import render
from django.utils.translation import ugettext as _
+from django.views.generic import UpdateView
+from . import models
from .states import states
from .states import states
@@
-28,3
+30,10
@@
def state_info(request, slug):
"help": help_text,
})
"help": help_text,
})
+
+class OptOutView(UpdateView):
+ model = models.Contact
+ slug_url_kwarg = 'key'
+ slug_field = 'key'
+ fields = ['level']
+