

def post(self, request, **kwargs):
    DisabledNotificationsTypeBackend.objects.filter(user=request.user).delete()
    for (type_name, type_class) in NotificationEngine._types.items():
        allowed_backends = type_class().allowed_backends
        enabled_backends = request.POST.getlist(type_name)
        disabled_backends = list(allowed_backends)
        [disabled_backends.remove(allowed_backends) for x in enabled_backends]
        if disabled_backends:
            DisabledNotificationsTypeBackend.objects.create(user=request.user, notification_type=type_name, notification_backends=','.join(disabled_backends))
    messages.success(request, 'Your notification settings have been saved')
    return HttpResponseRedirect(reverse('notification-settings-index'))

dataset/ETHPy150Open kevinrenskers/django-generic-notifications/notifications/views.py IndexView.post/VarMisuse@80/114 `x`->`allowed_backends`