django-cookie-consent
  • Quickstart
  • Main concepts
  • Usage
  • Javascript integration
  • Example app
  • Settings
  • Contributing
  • Changelog
  • Models
  • Views
  • Util
  • Template tags
  • Middleware
django-cookie-consent
  • Django cookie consent
  • View page source

Django cookie consent

Manage cookie information and let visitors give or reject consent for them.

Jazzband

Build status Code quality checks black Coverage status Documentation Status

python-versions django-versions pypi-version

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

You can find the source code and development progress on https://github.com/jazzband/django-cookie-consent/.

User Guide

  • Quickstart
    • Installation
    • Configuration
  • Main concepts
    • Cookie Group
    • Cookie
    • Saving user selection
    • Caching
  • Usage
    • Checking for cookie consent in views
    • Checking for cookie consent in templates
    • Checking for 3rd party cookies dynamically
    • Asking users for cookie consent in templates
  • Javascript integration
    • Getting started
    • Options
    • Enabling other scripts after cookies were accepted
    • Considerations and design decisions made for the JS integration
  • Example app
    • Running the testapp
  • Settings
  • Contributing
    • How can you contribute?
  • Changelog
    • 0.7.0 (2025-04-26)
    • 0.6.0 (2024-05-10)
    • 0.5.0b0 (2023-09-24)
    • 0.4.0 (2023-06-11)
    • 0.3.1 (2022-02-17)
    • 0.3.0 (2021-12-08)
    • 0.2.6 (2020-06-17)
    • 0.2.5 (2020-06-17)
    • 0.2.4 (2020-06-17)
    • 0.2.3 (2020-06-15)
    • 0.2.2 (2020-06-15)
    • 0.2.1 (2020-06-02)
    • 0.2.0 (2020-02-11)
    • 0.1.1
    • 0.1.0

API documentation

  • Models
    • BaseQueryset
    • Cookie
    • CookieGroup
    • CookieGroupDict
    • LogItem
  • Views
    • CookieGroupAcceptView
    • CookieGroupBaseProcessView
    • CookieGroupDeclineView
    • CookieGroupListView
    • CookieStatusView
  • Util
    • accept_cookies()
    • are_all_cookies_accepted()
    • decline_cookies()
    • get_accepted_cookie_groups()
    • get_accepted_cookies()
    • get_cookie_string()
    • get_cookie_value_from_request()
    • get_declined_cookie_groups()
    • get_not_accepted_or_declined_cookie_groups()
    • is_cookie_consent_enabled()
  • Template tags
    • cookie_consent
  • Middleware
    • CleanCookiesMiddleware

Indices and tables

  • Index

  • Module Index

  • Search Page

Next

© Copyright 2013, Bojan Mihelac.

Built with Sphinx using a theme provided by Read the Docs.