'A Wagtail package for seamless cookies consent integration and management.'
Project description
============ wagtail_cookies_consent
wagtail_cookies_consent is ... Detailed documentation is in the "docs" directory.
Quick start
-
Add "wagtail_cookies_consent" to your INSTALLED_APPS setting like this::
INSTALLED_APPS = [ ..., "wagtail_cookies_consent", ]
-
Include the polls URLconf in your project urls.py like this::
-
from wagtail_cookies_consent import urls as cookies_consent_urls
-
path('',include(cookies_consent_urls))
-
-
Run
python manage.py migrateto create the models. -
In base.html template import cookies_banner
-
{% load cookie_consent_tags %}
-
{% cookies_banner bg_color='#fff' accordion_but='#004f3a' accept_btn='#005f47' accept_hover="#005f47" necessary_btn='#005f47' necessary_hover='#004f3a' custom_btn='#fff' custom_hover='#fff' confirm_btn='#005f47' confirm_hover='#005f47' anchor='#308282' anchor_hover='#fff' %}
-
-
Start the development server and visit the wagtail admin to create a cookies groups , cookies and cookies banner.
-
Check if cookie group is accepted
-
load cookie_consent_tags in template and use cookie_group_accepted
-
Examples:
-
{{ request|cookie_group_accepted:"analytics" }}
-
output : False or True
-
-
cookies_banner Parameters
bg_color:
Description: Sets the background color of the banner.
Type: Hex color code (e.g., #fff for white).
Example: bg_color='#fff'
accordion_but:
Description: Sets the background color of the accordion button.
Type: Hex color code (e.g., #004f3a for dark green).
Example: accordion_but='#004f3a'
accept_btn:
Description: Sets the color of the "Accept All" button.
Type: Hex color code (e.g., #005f47 for dark teal).
Example: accept_btn='#005f47'
accept_hover:
Description: Sets the hover color of the "Accept All" button.
Type: Hex color code (e.g., #005f47 for dark teal).
Example: accept_hover='#005f47'
necessary_btn:
Description: Sets the color of the "Necessary Only" button.
Type: Hex color code (e.g., #005f47 for dark teal).
Example: necessary_btn='#005f47'
necessary_hover:
Description: Sets the hover color of the "Necessary Only" button.
Type: Hex color code (e.g., #004f3a for dark green).
Example: necessary_hover='#004f3a'
custom_btn:
Description: Sets the color of the "Customize" button.
Type: Hex color code (e.g., #fff for white).
Example: custom_btn='#fff'
custom_hover:
Description: Sets the hover color of the "Customize" button.
Type: Hex color code (e.g., #fff for white).
Example: custom_hover='#fff'
confirm_btn:
Description: Sets the color of the "Confirm" button.
Type: Hex color code (e.g., #005f47 for dark teal).
Example: confirm_btn='#005f47'
confirm_hover:
Description: Sets the hover color of the "Confirm" button.
Type: Hex color code (e.g., #005f47 for dark teal).
Example: confirm_hover='#005f47'
anchor:
Description: Sets the color of anchor links (e.g., "Learn more" links).
Type: Hex color code (e.g., #308282 for teal).
Example: anchor='#308282'
anchor_hover:
Description: Sets the hover color of anchor links.
Type: Hex color code (e.g., #fff for white).
Example: anchor_hover='#fff'
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters