+ fields = []
+
+ def get_success_url(self):
+ return reverse('messaging_optout_ok', args=[self.object.key])
+
+ def form_valid(self, form):
+ self.object.ascend(Level.OPT_OUT)
+ return super().form_valid(form)
+
+
+class OptOutOkView(DetailView):
+ model = models.Contact
+ slug_url_kwarg = 'key'
+ slug_field = 'key'
+