Skip to content
Reusable application for managing various cookies and visitors consent for their use in Django project.
Python HTML JavaScript Shell
Branch: master
Clone or download

Latest commit

Latest commit 0837042 Mar 30, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cookie_consent [FIX] Views ignore 'next' url parameter (#12) Mar 30, 2020
docs Update configuration.rst (#9) Mar 23, 2020
requirements Broader support (#6) Feb 11, 2020
tests [FIX] Views ignore 'next' url parameter (#12) Mar 30, 2020
.gitignore Broader support (#6) Feb 11, 2020
.travis.yml Broader support (#6) Feb 11, 2020
AUTHORS Update AUTHORS Mar 30, 2020
LICENSE Add licence/authors Jun 9, 2013
MANIFEST.in Broader support (#6) Feb 11, 2020
README.md doc: fix example app username (#10) Mar 24, 2020
runtests.sh Initial release Jun 7, 2013
setup.py Back to development: 0.2.1 Feb 11, 2020

README.md

Django cookie consent

Build Status

django-cookie-consent is a reusable application for managing various cookies and visitors consent for their use in Django project.

support ranges from django 1.9 to 3.0 and python 2.7 to 3.7

Features:

  • cookies and cookie groups are stored in models for easy management through Django admin interface

  • support for both opt-in and opt-out cookie consent schemes

  • removing declined cookies (or non accepted when opt-in scheme is used)

  • logging user actions when they accept and decline various cookies

  • easy adding new cookies and seamlessly re-asking for consent for new cookies

Documentation

https://django-cookie-consent.readthedocs.org/en/latest/

Configuration

  1. Add cookie_consent to your INSTALLED_APPS.

  2. Add django.template.context_processors.request to TEMPLATE_CONTEXT_PROCESSORS if it is not already added.

  3. Include django-cookie-consent urls in urls.py::

    url(r'^cookies/', include('cookie_consent.urls'))

  4. Run migrate django management command.

Example app

::

cd tests && ./manage.py runserver

Username and password for admin are 'administrator', 'password'.

You can’t perform that action at this time.