{% load cookielaw_tags %} and add {% cookielaw_banner %} template
tag where you want to display the cookielaw banner. Best place for this is
your ‘base’ template, so you will have the cookie banner on every page of
your website.
Configuration
If you want to use our default template, add cookielaw/css/cookielaw.css to
the markup and you should see the cookie law banner at the top of the page until
you dismiss it with the button in the top-right. This CSS is Twitter Bootstrap
compatible, but chances are, you’ll like to adjust it anyway.
To change the markup, just add a template named cookielaw/banner.html and
make sure it is loaded before the default template (for example put the
django.template.loaders.filesystem.Loader before
django.template.loaders.app_directories.Loader and add your new template
to any of the TEMPLATE_DIRS).
To change the CSS, just write your own rules and don’t include the default
stylesheet.
If you want your visitors to be able to reject the cookies, you should setup
cookielaw context processor by adding it to TEMPLATE_CONTEXT_PROCESSORS
like this:
That will add cookielaw context variable to the template context. That
variable is a dict with 3 keys: notset, accepted and rejected, each
with true or false value.
Instead of default banner.html template, use rejectable.html one which
shows an example of how to reject the cookies (of course, you may change the
template to suit your own needs, just take care that you have
<div id="CookielawBanner"> container.
In your templates, you can choose to display the banner only for new visitors
(case when cookie is not set):
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.