@view_config(request_method='POST')
    def post(self):
        try:
            appstruct = self.form.validate(self.request.POST.items())
        except deform.ValidationFailure:
            return {'form': self.form.render()}

        for n in self._user_notifications():
            n.active = n.type in appstruct['notifications']

        self.request.session.flash(_("Success. We've saved your changes."),
                                   'success')
        return httpexceptions.HTTPFound(
            location=self.request.route_url('profile_notifications'))
Process notifications POST data.
dataset/ETHPy150Open hypothesis/h/h/accounts/views.py/NotificationsController.post