+
+
+class DisableNotifications(TemplateView):
+ template_name = "funding/disable_notifications.html"
+
+ @csrf_exempt
+ def dispatch(self, request):
+ self.object = get_object_or_404(Funding,
+ email=request.GET.get('email'), notify_key=request.GET.get('key'))
+ return super(DisableNotifications, self).dispatch(request)
+
+ def post(self, *args, **kwargs):
+ self.object.disable_notifications()
+ return redirect(self.request.get_full_path())