def decline_cookies(request, response, varname=None):
    cookie_dic = get_cookie_dict_from_request(request)
    for cookie_group in get_cookie_groups(varname):
        cookie_dic[cookie_group.varname] = settings.COOKIE_CONSENT_DECLINE
        delete_cookies(response, cookie_group)
        LogItem.objects.create(action=ACTION_DECLINED,
                               cookiegroup=cookie_group,
                               version=cookie_group.get_version())
    set_cookie_dict_to_response(response, cookie_dic)
Replaces a document that passes the filter.
dataset/ETHPy150Open bmihelac/django-cookie-consent/cookie_consent/util.py/decline_cookies--crossover with--dataset/ETHPy150Open lvieirajr/mongorest/mongorest/collection.py/Collection.replace_one