Closed krasomil closed 2 years ago
I fixed it by including the code on a starting page:
{% if not "cookielaw_accepted" in request.COOKIES %}
{% include 'partials/cookie_banner.html' %}
{% endif %}
However, I'm not sure if that's how developers of django_cookie_law intended users to use it.
I fixed it by including the code on a starting page:
{% if not "cookielaw_accepted" in request.COOKIES %} {% include 'partials/cookie_banner.html' %} {% endif %}
However, I'm not sure if that's how developers of django_cookie_law intended users to use it.
Thanks for this tip. I had the same issue with a custom banner html but your tip above fixed it.
Yes, that's the only way to do this if you're not using the template tag.
Otherwise just override the contents of the banner by placing a template under templates/cookielaw/banner.html
.
Hello,
I use django-cookie-law==2.0.3, Django 3.0.5 and django-classy-tags 1.0.0. I also put my banner in the following cookie_banner.html page:
I also call {% load cookielaw_tags %} in my base.html. When I load the website, I get the banner and when pressing "Ok, understood" it disappears. However, after refreshing the page, it re-appears again. Do you have any idea if what is wrong here? Could it be caused by a bug in cookielaw\js\cookielaw.js?