Cookie consent component for any Django web-site
Project description
Cookie consent
Cookie consent is a Django app to show consent component for web-cookies.
Quick start
- Add "cookie_consent" to your
INSTALLED_APPS
setting like this:
INSTALLED_APPS = [
"cookie_consent",
...,
]
- Include the cookie_consent URLconf in your project urls.py like this:
path("cookie_consent/", include("cookie_consent.urls")),
- Run
python manage.py migrate
to create the models. - Include consent template in your web-site templates.
For example, I've included that text in my base template:
{% block cookie_consent %}
<link rel="stylesheet" href="{% static 'cookie_consent/css/index.css' %}">
{% include 'cookie_consent/includes/consent.html' %}
<script type="module" src="/assets/js/toolkit/cookie_consent.js"></script>
{% endblock %}
- Start the development server and visit necessary pages.
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
Close
Hashes for django-cookie_consent_gutsh-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 482b13783b38206f312d0f9bf225155b4b8c4fadc74d84a170520c13aa03a760 |
|
MD5 | 3c90fc133fdef2f9b882c07f9c0f0981 |
|
BLAKE2b-256 | 185474c64b769eeaae06d079b4379fd91338472899ba8d58d1cc630e2b150581 |