Skip to main content

Django cookie consent application

Project description

Django cookie consent

Build Status PyPI - License PyPI PyPI PyPI

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

Support ranges from django 2.2 to 4.0 and python 3.6 to 3.9


  • 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



  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

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

  4. Run migrate django management command.

Example app


cd tests && ./ runserver

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-cookie-consent-0.3.1.tar.gz (15.2 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page