Cookie Group model represents a group of related cookies. For all but
required cookie groups, user gives consent or decline their use.
Each Cookie Group has current version that is timestamp when last cookie
is added. When user accept cookie group, current version is saved in
Versions allows django-cookie-consent app
to know if new cookies have been introduced since user given a consent for
specific cookie use and to ask them to re-accept new cookies when needed.
Variable name that will be used for this cookie group.
Required cookies are not deleted and user cannot affect them.
This could be
csrftoken and others.
Without this cookies website will not work properly and user can’t opt-out.
If cookie group is deletable, django-cookie-consent will try
to delete cookies in this group when declined or through
Cookie model represent each cookie.
path attributes are important for deleting
Saving user selection
User selection regard cookie use are saved in a cookie with default name
cookie_consent value could be:
In above example user declined cookie group with
and accepted cookie group
social with all cookies created before
To avoid hitting database for each request, non required
cookies and cookie groups are cached.