Skip to content

Context processors

hypha.cookieconsent.context_processors

cookies_accepted

cookies_accepted(request)
Source code in hypha/cookieconsent/context_processors.py
1
2
3
4
5
6
def cookies_accepted(request):
    cookieconsent = False
    if request.COOKIES.get("cookieconsent", "decline") == "accept":
        cookieconsent = True

    return {"COOKIES_ACCEPTED": cookieconsent}