Django plugin to add and configure the Cookie Control by Civic UK
Project description
django-cookie-control
A Django plugin to integrate the Civic UK Cookie Control (https://www.civicuk.com/cookie-control)
The plugin is compatible with Django, DjangoCMS and Django/CMS multisite.
Updates
- 2020-08-21 Version 4.x + Updated to use Cookie Control version 9.x
To install
Install the application via pip:
pip install django-cookie-control
Add 'django_cookie_control' to installed apps:
INSTALLED_APPS = [ ... 'django_cookie_control', ...]
Add/Edit the following to settings.py
if required with required cookies:
# DEFAULT if missing:
COOKIE_CONTROL_REQUIRED_COOKIES = ['csrftoken','django_language','sessionid','django_privacy_mgmt_preferences','AWSALB']
Run or make migrations:
python.exe manage.py migrate
To configure
For a full list of configuration settings see the Civic UK site, here:
https://www.civicuk.com/cookie-control/documentation
Plugin configuration overview:
-
Add a new configuration:
-
Configure Main Settings:
- Site name
- API key
- Cookie Control product version: Community, Pro, Pro Multisite
-
Settings:
https://www.civicuk.com/cookie-control/documentation#configuration-options
- consentCookieExpiry
- statement
- logConsent
- encodeCookie
- subDomains
-
IAB/CCPA Frameworks:
https://www.civicuk.com/cookie-control/documentation#iab
- mode
- publisherCC
- iabCMP
- iabConfig
- iabText
- ccpaConfig
-
Appearance and Behaviour:
https://www.civicuk.com/cookie-control/documentation#customising
- All other settings
-
Accessibility:
https://www.civicuk.com/cookie-control/documentation#accessibility-object
- Determines the accessibility helpers available, such as the accesskey and keyboard focus style.
-
Cookies:
https://www.civicuk.com/cookie-control/documentation#purpose-object
- Necessary Cookies
- A simple list of cookie names, including wildcards that are necessary for the site
- A default list for Django, DjangoCMS, and AWS are already included.
- Optional Cookies
- Add an optional cookie or package of cookies that can be turned off for the site
- Using separate functions On Accept or for On Revoke the cookies can be customised to be disable or enabled.
- Necessary Cookies
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for django_cookie_control-4.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8003e14173b4fa2a25e622c437cf7d381ebc1ba3c7c1a62e79d7ec351394098c |
|
MD5 | 6d8ffcf7a2bf9bc1ad12e739474bbb27 |
|
BLAKE2b-256 | 2360c133dc3a79836e8644112c98526df0e04bb21d9026f81dd64bbce16e2c35 |
Hashes for django_cookie_control-4.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86a6f6a4083d816982dddd8e6d319d8c9c095b0d73789728239ec4e2f40d69b4 |
|
MD5 | c10dcef1b9bac88c112ec1c57b2d3e73 |
|
BLAKE2b-256 | aa1ee2f2ebcd3128ea30c1d5afbccb0ae26e63935850bf3e2e9900f83a7c19f8 |