SettingsΒΆ

COOKIE_CONSENT_NAME

name of consent cookie that remembers user choice

Default: cookie_consent.

COOKIE_CONSENT_MAX_AGE

max-age of consent cookie

Default: 1 year

COOKIE_CONSENT_DECLINE
decline value Default: -1
COOKIE_CONSENT_ENABLED

boolean or callable that receives request and return boolean.

IE if you want to enable cookie consent for debug ot staff only:

COOKIE_CONSENT_ENABLED = lambda r: DEBUG or (r.user.is_authenticated() and r.user.is_staff)

Default: True

COOKIE_CONSENT_OPT_OUT

Boolean value represents if cookies are opt-in or opt-out opt-out cookies are set until declined opt-in cookies are set only if accepted

Default: False

COOKIE_CONSENT_CACHE_BACKEND

Alias for backend to use for caching.

Default: default

Project Versions

Previous topic

Example app

Next topic

Contributing

This Page